Merge branch 'improve-rx-java-blacklists' of s416084/find-my-tutor-android into develop

This commit is contained in:
Mieszko Wrzeszczyński 2019-01-04 23:36:48 +00:00 committed by Gogs
commit 3f0ccda50b
13 changed files with 175 additions and 255 deletions

View File

@ -10,7 +10,7 @@ android {
applicationId "com.uam.wmi.findmytutor"
minSdkVersion 22
targetSdkVersion 27
versionCode 33
versionCode 34
versionName "0.9.6-beta"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

View File

@ -49,16 +49,24 @@ import com.uam.wmi.findmytutor.utils.PrefUtils;
import com.uam.wmi.findmytutor.utils.RecyclerTouchListener;
import com.uam.wmi.findmytutor.utils.RestApiHelper;
import com.uam.wmi.findmytutor.utils.SharingLevel;
import com.uam.wmi.findmytutor.utils.WrapContentLinearLayoutManager;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.functions.Function;
import io.reactivex.observers.DisposableObserver;
import io.reactivex.observers.DisposableSingleObserver;
import io.reactivex.schedulers.Schedulers;
import okhttp3.ResponseBody;
@ -78,10 +86,10 @@ public class BlackList extends AppCompatActivity {
Switch aSwitch;
@BindView(R.id.add_to_black_list_fab)
FloatingActionButton addToBlackListFab;
private Integer prevSize;
private BlackListAdapter mAdapter;
private List<User> blacklistedUsers = new ArrayList<>();
private HashSet<String> blacklistedUsersIDs = new HashSet<>();
private Collator plCollator = Collator.getInstance(Locale.forLanguageTag("pl-PL"));
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -108,12 +116,12 @@ public class BlackList extends AppCompatActivity {
setSupportActionBar(toolbar);
mAdapter = new BlackListAdapter(this, blacklistedUsers);
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
recyclerView.setLayoutManager(mLayoutManager);
recyclerView.setLayoutManager(new WrapContentLinearLayoutManager(getApplicationContext()));
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.addItemDecoration(new MyDividerItemDecoration(this, LinearLayoutManager.VERTICAL, 16));
recyclerView.setAdapter(mAdapter);
fetchBlackListedUsers();
/**
* On long press on RecyclerView item, open alert dialog
* with options to choose
@ -132,57 +140,62 @@ public class BlackList extends AppCompatActivity {
addToBlackListFab.setOnClickListener(this::showFabDialog);
fetchBlackListedUsersIDs(PrefUtils.getUserId(getApplicationContext()));
handleSwitch();
}
private void fetchBlackListedUsersIDs(String userId) {
disposable.add(
userService.getTutorBlacklistedByID(userId)
private Observable<List<String>> getListOfBlacklistedUsers(String userId) {
return userService.getTutorBlacklistedByID(userId)
.toObservable()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
private Observable<User> getUserObservable(String userId) {
return userService
.getUserById(userId)
.toObservable()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
private void fetchBlackListedUsers() {
prevSize = blacklistedUsers.size();
blacklistedUsers.clear();
disposable.add(getListOfBlacklistedUsers(tutorId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribeWith(new DisposableSingleObserver<List<String>>() {
.flatMap((Function<List<String>, Observable<String>>) Observable::fromIterable)
.flatMap((Function<String, ObservableSource<User>>) this::getUserObservable)
.subscribeWith(new DisposableObserver<User>() {
@Override
public void onSuccess(List<String> users) {
blacklistedUsersIDs.addAll(users);
didFetched = true;
fetchBlackListedUsers();
toggleEmptyNotes();
public void onNext(User user) {
blacklistedUsers.add(user);
}
@Override
public void onError(Throwable e) {
showError(e);
}
})
);
@Override
public void onComplete() {
Collections.sort(blacklistedUsers, (a, b) -> sortByUserName(a,b));
refreshUI();
}
}));
}
private void fetchBlackListedUsers() {
for (String GUID : blacklistedUsersIDs){
disposable.add(
userService.getUserById(GUID)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribeWith(new DisposableSingleObserver<User>() {
@Override
public void onSuccess(User user) {
blacklistedUsers.add(user);
toggleEmptyNotes();
if (blacklistedUsers.size() == blacklistedUsersIDs.size()) {
mAdapter.notifyDataSetChanged();
}
}
@Override
public void onError(Throwable e) {
showError(e);
}
})
);
}
private void refreshUI(){
toggleEmptyNotes();
mAdapter.notifyItemRangeInserted(prevSize, blacklistedUsers.size() - prevSize);
mAdapter.notifyDataSetChanged();
}
private int sortByUserName(User t1, User t2) {
return plCollator.compare(t1.getLastName(), t2.getLastName());
}
private void showFabDialog(View v){
LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getApplicationContext());
@ -235,9 +248,9 @@ public class BlackList extends AppCompatActivity {
private void handleAddUser(User user) {
blacklistedUsersIDs.clear();
Toast.makeText(this, R.string.add_user_to_list, Snackbar.LENGTH_LONG).show();
blacklistedUsers.clear();
blacklistedUsersIDs.addAll(user.getBlacklist());
fetchBlackListedUsers();
}

View File

@ -149,7 +149,7 @@ public class LoginActivity extends AppCompatActivity {
private void loginProcess(String email, String password) {
ValidateUser user = new ValidateUser(email, password);
//LdapUser fakeUser = new LdapUser(email, password,"wmi","tutor",email,"Fałszywy",email);
// LdapUser fakeUser = new LdapUser(email, password,"wmi","tutor",email,"Fałszywy",email);
disposable.add(ldapService.validate(user)
//disposable.add(ldapService.fakeValidate(fakeUser)
.subscribeOn(Schedulers.io())

View File

@ -150,22 +150,7 @@ public class MapActivity extends BaseActivity
mapboxMap.setOnMarkerClickListener(marker -> {
String id = markerUserHash.get(marker.getId());
String locationLevel = PrefUtils.getLocationLevel(getApplicationContext());
/* if (id.equals(myId) && (locationLevel.equals(SharingLevel.MANUAL.toString()) || locationLevel.equals(SharingLevel.PREDEFINED.toString()))) {
selectLocationButton.setVisibility(View.GONE);
removeLocationButton.setVisibility(View.VISIBLE);
removeLocationButton.setOnClickListener(view -> {
stopBackgroundLocalizationTask();
removeLocationButton.setVisibility(View.GONE);
Toast.makeText(MapActivity.this, R.string.manual_marker_info, Toast.LENGTH_SHORT).show();
});
} else {*/
createMarkerModal(id);
/* }*/
createMarkerModal(id);
return true;
});
@ -248,7 +233,11 @@ public class MapActivity extends BaseActivity
}
private void setOnMapClickListener() {
mapboxMap.addOnMapClickListener(e -> removeLocationButton.setVisibility(View.GONE));
mapboxMap.addOnMapClickListener(e -> {
removeLocationButton.setVisibility(View.GONE);
selectLocationButton.setVisibility(View.GONE);
});
}
private void setOnMapLongClickListener() {

View File

@ -76,7 +76,6 @@ public class UsersListFragment extends Fragment {
private CompositeDisposable disposable = new CompositeDisposable();
private TutorsListAdapter mAdapter;
private List<User> tutorsList = new ArrayList<>();
private List<User> tutorsFiltered = new ArrayList<>();
private Collator plCollator = Collator.getInstance(Locale.forLanguageTag("pl-PL"));
private Boolean fetchOnlyOnlineUsers = PrefUtils.getShowOnlyOnlineUsers(getApplicationContext());
@ -88,7 +87,7 @@ public class UsersListFragment extends Fragment {
}
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mAdapter = new TutorsListAdapter(getActivity().getApplicationContext(), tutorsFiltered);
mAdapter = new TutorsListAdapter(getActivity().getApplicationContext(), tutorsList);
View view = inflater.inflate(R.layout.users_list, container, false);
view.setBackgroundColor(getResources().getColor(android.R.color.white));
setHasOptionsMenu(true);
@ -117,7 +116,7 @@ public class UsersListFragment extends Fragment {
recyclerView, new RecyclerTouchListener.ClickListener() {
@Override
public void onClick(View view, final int position) {
showNoteDialog(tutorsFiltered.get(position));
showNoteDialog(tutorsList.get(position));
}
@Override
@ -278,12 +277,9 @@ public class UsersListFragment extends Fragment {
.observeOn(AndroidSchedulers.mainThread())
.map(tutors -> {
List<User> tutorsList = new ArrayList<>(tutors);
List<User> onlineTutors = Stream.of(tutorsList).filter(User::isIsOnline).toList();
List<User> activeNotOnlineTutors = Stream.of(tutorsList)
.filter(t -> t.isIsActive() && !onlineTutors.contains(t)).toList();
List<User> notActiveTutors = Stream.of(tutorsList)
.filterNot(User::isIsActive).toList();
@ -301,9 +297,7 @@ public class UsersListFragment extends Fragment {
@Override
public void onSuccess(List<User> users) {
tutorsList.clear();
tutorsFiltered.clear();
tutorsList.addAll(users);
tutorsFiltered.addAll(users);
mAdapter.notifyDataSetChanged();
toggleEmptyNotes();
}
@ -324,8 +318,8 @@ public class UsersListFragment extends Fragment {
.subscribeWith(new DisposableSingleObserver<List<User>>() {
@Override
public void onSuccess(List<User> users) {
tutorsFiltered.clear();
tutorsFiltered.addAll(users);
tutorsList.clear();
tutorsList.addAll(users);
mAdapter.notifyDataSetChanged();
}

View File

@ -39,19 +39,29 @@ import com.uam.wmi.findmytutor.utils.MyDividerItemDecoration;
import com.uam.wmi.findmytutor.utils.PrefUtils;
import com.uam.wmi.findmytutor.utils.RecyclerTouchListener;
import com.uam.wmi.findmytutor.utils.RestApiHelper;
import com.uam.wmi.findmytutor.utils.WrapContentLinearLayoutManager;
import java.text.Collator;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.functions.Function;
import io.reactivex.observers.DisposableObserver;
import io.reactivex.observers.DisposableSingleObserver;
import io.reactivex.schedulers.Schedulers;
import okhttp3.ResponseBody;
public class WhiteList extends AppCompatActivity {
private CompositeDisposable disposable = new CompositeDisposable();
@ -68,8 +78,10 @@ public class WhiteList extends AppCompatActivity {
@BindView(R.id.add_to_white_list_fab)
FloatingActionButton addToWhiteListFab;
private WhiteListAdapter mAdapter;
private Integer prevSize;
private List<User> whitelistedUsers = new ArrayList<>();
private HashSet<String> whitelistedUsersIDs = new HashSet<>();
private Collator plCollator = Collator.getInstance(Locale.forLanguageTag("pl-PL"));
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -96,8 +108,7 @@ public class WhiteList extends AppCompatActivity {
setSupportActionBar(toolbar);
mAdapter = new WhiteListAdapter(this, whitelistedUsers);
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
recyclerView.setLayoutManager(mLayoutManager);
recyclerView.setLayoutManager(new WrapContentLinearLayoutManager(getApplicationContext()));
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.addItemDecoration(new MyDividerItemDecoration(this, LinearLayoutManager.VERTICAL, 16));
recyclerView.setAdapter(mAdapter);
@ -119,59 +130,62 @@ public class WhiteList extends AppCompatActivity {
}));
addToWhiteListFab.setOnClickListener(this::showFabDialog);
fetchWhiteListedUsersIDs(PrefUtils.getUserId(getApplicationContext()));
fetchWhiteListedUsers();
handleSwitch();
}
private void fetchWhiteListedUsersIDs(String userId) {
disposable.add(
userService.getTutorWhitelistedByID(userId)
private Observable<List<String>> getListOfWhitelistedUsers(String userId) {
return userService.getTutorWhitelistedByID(userId)
.toObservable()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribeWith(new DisposableSingleObserver<List<String>>() {
@Override
public void onSuccess(List<String> users) {
whitelistedUsersIDs.addAll(users);
didFetched = true;
fetchWhiteListedUsers();
toggleEmptyNotes();
}
.observeOn(AndroidSchedulers.mainThread());
}
@Override
public void onError(Throwable e) {
showError(e);
}
})
);
private Observable<User> getUserObservable(String userId) {
return userService
.getUserById(userId)
.toObservable()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
private void fetchWhiteListedUsers() {
for (String GUID : whitelistedUsersIDs){
disposable.add(
userService.getUserById(GUID)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribeWith(new DisposableSingleObserver<User>() {
@Override
public void onSuccess(User user) {
whitelistedUsers.add(user);
toggleEmptyNotes();
prevSize = whitelistedUsers.size();
whitelistedUsers.clear();
if (whitelistedUsers.size() == whitelistedUsersIDs.size()) {
mAdapter.notifyDataSetChanged();
}
}
disposable.add(getListOfWhitelistedUsers(tutorId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.flatMap((Function<List<String>, Observable<String>>) Observable::fromIterable)
.flatMap((Function<String, ObservableSource<User>>) this::getUserObservable)
.subscribeWith(new DisposableObserver<User>() {
@Override
public void onNext(User user) {
whitelistedUsers.add(user);
}
@Override
public void onError(Throwable e) {
showError(e);
}
})
);
}
@Override
public void onError(Throwable e) {
showError(e);
}
@Override
public void onComplete() {
Collections.sort(whitelistedUsers, (a, b) -> sortByUserName(a,b));
refreshUI();
}
}));
}
private void refreshUI(){
toggleEmptyNotes();
mAdapter.notifyItemRangeInserted(prevSize, whitelistedUsers.size() - prevSize);
mAdapter.notifyDataSetChanged();
}
private int sortByUserName(User t1, User t2) {
return plCollator.compare(t1.getLastName(), t2.getLastName());
}
private void showFabDialog(View v){
LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getApplicationContext());
@ -223,9 +237,7 @@ public class WhiteList extends AppCompatActivity {
}
private void handleAddUser(User user) {
whitelistedUsersIDs.clear();
whitelistedUsers.clear();
whitelistedUsersIDs.addAll(user.getWhitelist());
Toast.makeText(this, R.string.add_user_to_list, Snackbar.LENGTH_LONG).show();
fetchWhiteListedUsers();
}
@ -241,11 +253,11 @@ public class WhiteList extends AppCompatActivity {
} else {
message = "Network Error !";
}
Log.e("ERR",message);
Toast.makeText(this, message, Snackbar.LENGTH_LONG).show();
}
private void toggleEmptyNotes() {
if (didFetched && whitelistedUsers.size() == 0) {
noNotesView.setText(R.string.list_is_empty);
noNotesView.setVisibility(View.VISIBLE);
@ -280,7 +292,6 @@ public class WhiteList extends AppCompatActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_white_list, menu);
return true;
}

View File

@ -41,11 +41,11 @@ public class BlackListAdapter extends RecyclerView.Adapter<BlackListAdapter.MyVi
private CompositeDisposable disposable = new CompositeDisposable();
private UserService userService;
public BlackListAdapter(Context context, List<User> tutors) {
this.context = context;
this.tutorsList = tutors;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
@ -73,25 +73,12 @@ public class BlackListAdapter extends RecyclerView.Adapter<BlackListAdapter.MyVi
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(()->{
Toast.makeText(getApplicationContext(), "User removed", Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), R.string.user_removed, Toast.LENGTH_SHORT).show();
tutorsList.remove(position);
notifyDataSetChanged();
},this::showError)
);
});
//
// if (tutor.isIsOnline()) {
// image = context.getResources().getDrawable(R.drawable.user_list_online);
// } else {
// image = context.getResources().getDrawable(R.drawable.user_list_offline);
// }
//
// if (!tutor.isIsActive()) {
// image = context.getResources().getDrawable(R.drawable.user_list_off);
// }
// image.setBounds(0, 0, image.getIntrinsicWidth(), image.getIntrinsicHeight());
// holder.isOnline.setCompoundDrawables(image, null, null, null);
}
@Override
@ -107,8 +94,6 @@ public class BlackListAdapter extends RecyclerView.Adapter<BlackListAdapter.MyVi
@BindView(R.id.lastName)
TextView lastName;
// @BindView(R.id.isOnline)
// TextView isOnline;
@BindView(R.id.removeUserImageButton)
ImageButton imageButton;
@ -127,8 +112,8 @@ public class BlackListAdapter extends RecyclerView.Adapter<BlackListAdapter.MyVi
} else {
message = "Network Error !";
}
Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();
}
}

View File

@ -29,7 +29,7 @@ public class DutyHoursAdapter extends RecyclerView.Adapter<DutyHoursAdapter.MyV
public DutyHoursAdapter(Context context, List<DutyHourViewModel> hours) {
this.context = context;
this.hours = new ArrayList<DutyHourViewModel>(hours);
this.hours = new ArrayList<>(hours);
}

View File

@ -39,7 +39,6 @@ public class WhiteListAdapter extends RecyclerView.Adapter<WhiteListAdapter.MyVi
private CompositeDisposable disposable = new CompositeDisposable();
private UserService userService;
public WhiteListAdapter(Context context, List<User> tutors) {
this.context = context;
this.tutorsList = tutors;
@ -61,8 +60,8 @@ public class WhiteListAdapter extends RecyclerView.Adapter<WhiteListAdapter.MyVi
User tutor = tutorsList.get(position);
holder.firstName.setText(tutor.getFirstName() + " " + tutor.getLastName());
holder.lastName.setText("Index: " + tutor.getLdapLogin() + " Email: " + tutor.getEmail());
//"s416196"
holder.lastName.setText("Index: " + tutor.getLdapLogin() + " Email: " + tutor.getEmail());
//""
holder.imageButton.setOnClickListener(l ->{
StudentIdModel studentIdModel = new StudentIdModel(tutor.getLdapLogin());
String tutorId = PrefUtils.getUserId(getApplicationContext());
@ -71,25 +70,13 @@ public class WhiteListAdapter extends RecyclerView.Adapter<WhiteListAdapter.MyVi
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(()->{
Toast.makeText(getApplicationContext(), "User removed", Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), R.string.user_removed, Toast.LENGTH_SHORT).show();
tutorsList.remove(position);
notifyDataSetChanged();
},this::showError)
);
});
//
// if (tutor.isIsOnline()) {
// image = context.getResources().getDrawable(R.drawable.user_list_online);
// } else {
// image = context.getResources().getDrawable(R.drawable.user_list_offline);
// }
//
// if (!tutor.isIsActive()) {
// image = context.getResources().getDrawable(R.drawable.user_list_off);
// }
// image.setBounds(0, 0, image.getIntrinsicWidth(), image.getIntrinsicHeight());
// holder.isOnline.setCompoundDrawables(image, null, null, null);
}
@Override
@ -105,8 +92,6 @@ public class WhiteListAdapter extends RecyclerView.Adapter<WhiteListAdapter.MyVi
@BindView(R.id.lastName)
TextView lastName;
// @BindView(R.id.isOnline)
// TextView isOnline;
@BindView(R.id.removeUserImageButton)
ImageButton imageButton;

View File

@ -10,6 +10,7 @@ import java.util.List;
import io.reactivex.Completable;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.Single;
import retrofit2.Response;
import retrofit2.http.Body;
@ -75,7 +76,7 @@ public interface UserService {
Completable setUserInActive(@Path("userID") String userID);
@GET("api/users/blacklist/{tutorID}")
Single<List<String>> getTutorBlacklistedByID(@Path("tutorID") String tutorID);
Single <List<String>> getTutorBlacklistedByID(@Path("tutorID") String tutorID);
@PUT("api/users/blacklist/{tutorID}")
Completable setTutorBlacklist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing);

View File

@ -0,0 +1,30 @@
package com.uam.wmi.findmytutor.utils;
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.util.Log;
public class WrapContentLinearLayoutManager extends LinearLayoutManager {
public WrapContentLinearLayoutManager(Context context) {
super(context);
}
public WrapContentLinearLayoutManager(Context context, int orientation, boolean reverseLayout) {
super(context, orientation, reverseLayout);
}
public WrapContentLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
try {
super.onLayoutChildren(recycler, state);
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
}
}
}

View File

@ -270,5 +270,9 @@
<string name="inactive">Nieaktywny</string>
<string name="show_on_map">POKAŻ NA MAPIE</string>
<!--(ENG) Blacked/Whited users -->
<string name="add_user_to_list">Użytkownik został dodany!</string>
<string name="user_removed">Użytkownik usunięty!</string>
</resources>

View File

@ -54,12 +54,10 @@
<!-- Strings related to SharingActivity -->
<string name="title_activity_sharing">Sharing</string>
<!-- Strings related to settings -->
<string name="title_sharing">Sharing</string>
<string name="settings_category_location">Location sharing</string>
<string name="settings_category_status">Status settings</string>
@ -87,14 +85,10 @@
<string name="title_manual_status">Add custom status</string>
<string name="settings_description">Descrition</string>
<string name="settings_description">Description</string>
<string name="saveButton">Save</string>
<string name="tutorTabHint">Edit your note. It will be shown in the users list.</string>
<string name="key_description">key_description</string>
<string name="manual_location">Manual location</string>
<string name="title_list_manual_location">Choose manual location</string>
<string name="title_manual_location">Add custom location</string>
@ -302,96 +296,6 @@
<string name="title_activity_white_list">Whitelist</string>
<string name="white_list_title">Add user to Whitelist</string>
<string name="large_text" translatable="false">
"Material is the metaphor.\n\n"
"A material metaphor is the unifying theory of a rationalized space and a system of motion."
"The material is grounded in tactile reality, inspired by the study of paper and ink, yet "
"technologically advanced and open to imagination and magic.\n"
"Surfaces and edges of the material provide visual cues that are grounded in reality. The "
"use of familiar tactile attributes helps users quickly understand affordances. Yet the "
"flexibility of the material creates new affordances that supercede those in the physical "
"world, without breaking the rules of physics.\n"
"The fundamentals of light, surface, and movement are key to conveying how objects move, "
"interact, and exist in space and in relation to each other. Realistic lighting shows "
"seams, divides space, and indicates moving parts.\n\n"
"Bold, graphic, intentional.\n\n"
"The foundational elements of print based design typography, grids, space, scale, color, "
"and use of imagery guide visual treatments. These elements do far more than please the "
"eye. They create hierarchy, meaning, and focus. Deliberate color choices, edge to edge "
"imagery, large scale typography, and intentional white space create a bold and graphic "
"interface that immerse the user in the experience.\n"
"An emphasis on user actions makes core functionality immediately apparent and provides "
"waypoints for the user.\n\n"
"Motion provides meaning.\n\n"
"Motion respects and reinforces the user as the prime mover. Primary user actions are "
"inflection points that initiate motion, transforming the whole design.\n"
"All action takes place in a single environment. Objects are presented to the user without "
"breaking the continuity of experience even as they transform and reorganize.\n"
"Motion is meaningful and appropriate, serving to focus attention and maintain continuity. "
"Feedback is subtle yet clear. Transitions are efficient yet coherent.\n\n"
"3D world.\n\n"
"The material environment is a 3D space, which means all objects have x, y, and z "
"dimensions. The z-axis is perpendicularly aligned to the plane of the display, with the "
"positive z-axis extending towards the viewer. Every sheet of material occupies a single "
"position along the z-axis and has a standard 1dp thickness.\n"
"On the web, the z-axis is used for layering and not for perspective. The 3D world is "
"emulated by manipulating the y-axis.\n\n"
"Light and shadow.\n\n"
"Within the material environment, virtual lights illuminate the scene. Key lights create "
"directional shadows, while ambient light creates soft shadows from all angles.\n"
"Shadows in the material environment are cast by these two light sources. In Android "
"development, shadows occur when light sources are blocked by sheets of material at "
"various positions along the z-axis. On the web, shadows are depicted by manipulating the "
"y-axis only. The following example shows the card with a height of 6dp.\n\n"
"Resting elevation.\n\n"
"All material objects, regardless of size, have a resting elevation, or default elevation "
"that does not change. If an object changes elevation, it should return to its resting "
"elevation as soon as possible.\n\n"
"Component elevations.\n\n"
"The resting elevation for a component type is consistent across apps (e.g., FAB elevation "
"does not vary from 6dp in one app to 16dp in another app).\n"
"Components may have different resting elevations across platforms, depending on the depth "
"of the environment (e.g., TV has a greater depth than mobile or desktop).\n\n"
"Responsive elevation and dynamic elevation offsets.\n\n"
"Some component types have responsive elevation, meaning they change elevation in response "
"to user input (e.g., normal, focused, and pressed) or system events. These elevation "
"changes are consistently implemented using dynamic elevation offsets.\n"
"Dynamic elevation offsets are the goal elevation that a component moves towards, relative "
"to the components resting state. They ensure that elevation changes are consistent "
"across actions and component types. For example, all components that lift on press have "
"the same elevation change relative to their resting elevation.\n"
"Once the input event is completed or cancelled, the component will return to its resting "
"elevation.\n\n"
"Avoiding elevation interference.\n\n"
"Components with responsive elevations may encounter other components as they move between "
"their resting elevations and dynamic elevation offsets. Because material cannot pass "
"through other material, components avoid interfering with one another any number of ways, "
"whether on a per component basis or using the entire app layout.\n"
"On a component level, components can move or be removed before they cause interference. "
"For example, a floating action button (FAB) can disappear or move off screen before a "
"user picks up a card, or it can move if a snackbar appears.\n"
"On the layout level, design your app layout to minimize opportunities for interference. "
"For example, position the FAB to one side of stream of a cards so the FAB wont interfere "
"when a user tries to pick up one of cards.\n\n"
</string>
<string name="info_icon_userlist_summary">After clicking on a name, the tutor tab will pop up, containing details about selected tutor.\n\nYou can search for any tutor on the map by entering his name and surname in the search field.\n\nBy default, only active users are shown. You can change that in menu (three dots icon).\n\nYou can also search for a tutor directly, by entering name and surname of person that you look for.</string>
<!--(ENG) Blacklist -->
@ -441,4 +345,8 @@
<string name="inactive">Inactive</string>
<string name="show_on_map">SHOW ON MAP</string>
<!--(ENG) Blacked/Whited users -->
<string name="add_user_to_list">User has been added!</string>
<string name="user_removed">User removed!</string>
</resources>