Add search to list
This commit is contained in:
parent
7191fcf6e7
commit
aa3dbfb185
@ -57,6 +57,5 @@ dependencies {
|
|||||||
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
||||||
implementation 'com.auth0.android:jwtdecode:1.1.1'
|
implementation 'com.auth0.android:jwtdecode:1.1.1'
|
||||||
implementation 'com.annimon:stream:1.2.1'
|
implementation 'com.annimon:stream:1.2.1'
|
||||||
implementation 'com.facebook.shimmer:shimmer:0.3.0'
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,10 @@ package com.uam.wmi.findmytutor.activity;
|
|||||||
|
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.app.FragmentTransaction;
|
import android.app.FragmentTransaction;
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.BottomNavigationView;
|
import android.support.design.widget.BottomNavigationView;
|
||||||
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.app.ActionBarDrawerToggle;
|
import android.support.v7.app.ActionBarDrawerToggle;
|
||||||
@ -13,14 +13,10 @@ import android.support.v7.app.AppCompatActivity;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.widget.SearchView;
|
import android.support.v7.widget.SearchView;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.AdapterView;
|
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.uam.wmi.findmytutor.ListViewAdapter;
|
import com.uam.wmi.findmytutor.ListViewAdapter;
|
||||||
import com.uam.wmi.findmytutor.R;
|
import com.uam.wmi.findmytutor.R;
|
||||||
@ -32,17 +28,13 @@ public abstract class BaseActivity
|
|||||||
implements BottomNavigationView.OnNavigationItemSelectedListener {
|
implements BottomNavigationView.OnNavigationItemSelectedListener {
|
||||||
|
|
||||||
protected BottomNavigationView navigationView;
|
protected BottomNavigationView navigationView;
|
||||||
|
|
||||||
protected Toolbar toolbar;
|
protected Toolbar toolbar;
|
||||||
|
|
||||||
public DrawerLayout drawerLayout;
|
public DrawerLayout drawerLayout;
|
||||||
private ActionBarDrawerToggle actionBarDrawerToggle;
|
private ActionBarDrawerToggle actionBarDrawerToggle;
|
||||||
// 4 search
|
|
||||||
private ListView listView;
|
|
||||||
private ArrayList<String> stringArrayList;
|
|
||||||
private ListViewAdapter adapter;
|
|
||||||
private SharingFragment sharingFragment;
|
private SharingFragment sharingFragment;
|
||||||
private Fragment userListFragment;
|
private Fragment userListFragment;
|
||||||
|
private String activeFragment = "";
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -54,14 +46,12 @@ public abstract class BaseActivity
|
|||||||
navigationView.setOnNavigationItemSelectedListener(this);
|
navigationView.setOnNavigationItemSelectedListener(this);
|
||||||
sharingFragment = new SharingFragment();
|
sharingFragment = new SharingFragment();
|
||||||
userListFragment = new UsersListActivity();
|
userListFragment = new UsersListActivity();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setContentView(int layoutResID) {
|
public void setContentView(int layoutResID) {
|
||||||
DrawerLayout fullView = (DrawerLayout) getLayoutInflater().inflate(R.layout.base_activity, null);
|
DrawerLayout fullView = (DrawerLayout) getLayoutInflater().inflate(R.layout.base_activity, null);
|
||||||
FrameLayout activityContainer = (FrameLayout) fullView.findViewById(R.id.activity_content);
|
FrameLayout activityContainer = fullView.findViewById(R.id.activity_content);
|
||||||
getLayoutInflater().inflate(layoutResID, activityContainer, true);
|
getLayoutInflater().inflate(layoutResID, activityContainer, true);
|
||||||
super.setContentView(fullView);
|
super.setContentView(fullView);
|
||||||
|
|
||||||
@ -69,7 +59,7 @@ public abstract class BaseActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initToolbar() {
|
private void initToolbar() {
|
||||||
toolbar = (Toolbar) findViewById(R.id.toolbar);
|
toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,12 +107,10 @@ public abstract class BaseActivity
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onQueryTextChange(String newText) {
|
public boolean onQueryTextChange(String newText) {
|
||||||
if (TextUtils.isEmpty(newText)) {
|
if(activeFragment.equals("userList")){
|
||||||
adapter.filter("");
|
((UsersListActivity) userListFragment).searchUser(newText);
|
||||||
listView.clearTextFilter();
|
|
||||||
} else {
|
|
||||||
adapter.filter(newText);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -150,15 +138,10 @@ public abstract class BaseActivity
|
|||||||
overridePendingTransition(0,0);
|
overridePendingTransition(0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setFragment(Fragment fragment) {
|
|
||||||
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
|
||||||
fragmentTransaction.replace(R.id.activity_content, fragment);
|
|
||||||
fragmentTransaction.commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void removeFragment(Fragment fragment) {
|
private void removeFragment(Fragment fragment) {
|
||||||
|
activeFragment = "map";
|
||||||
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
||||||
fragmentTransaction.remove(fragment);
|
fragmentTransaction.hide(fragment);
|
||||||
fragmentTransaction.commit();
|
fragmentTransaction.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,16 +154,10 @@ public abstract class BaseActivity
|
|||||||
if (itemId == R.id.nav_map) {
|
if (itemId == R.id.nav_map) {
|
||||||
removeFragment(sharingFragment);
|
removeFragment(sharingFragment);
|
||||||
removeFragment(userListFragment);
|
removeFragment(userListFragment);
|
||||||
// startActivity(new Intent(this, MapActivity.class));
|
|
||||||
} else if (itemId == R.id.nav_profile) {
|
} else if (itemId == R.id.nav_profile) {
|
||||||
// startActivity(new Intent(this, ProfileActivity.class));
|
loadUserSettingsFragment();
|
||||||
setFragment(sharingFragment);
|
|
||||||
removeFragment(userListFragment);
|
|
||||||
|
|
||||||
} else if (itemId == R.id.nav_user_list) {
|
} else if (itemId == R.id.nav_user_list) {
|
||||||
removeFragment(sharingFragment);
|
loadUserListFragment();
|
||||||
setFragment(userListFragment);
|
|
||||||
//startActivity(new Intent(this, UsersListActivity.class));
|
|
||||||
}
|
}
|
||||||
//finish();
|
//finish();
|
||||||
}, 300);
|
}, 300);
|
||||||
@ -188,6 +165,24 @@ public abstract class BaseActivity
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadUserSettingsFragment() {
|
||||||
|
activeFragment = "sharedSettings";
|
||||||
|
sharingFragment = SharingFragment.newInstance();
|
||||||
|
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||||
|
ft.replace(R.id.activity_content, sharingFragment);
|
||||||
|
ft.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadUserListFragment() {
|
||||||
|
activeFragment = "userList";
|
||||||
|
|
||||||
|
userListFragment = UsersListActivity.newInstance();
|
||||||
|
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||||
|
ft.replace(R.id.activity_content, userListFragment);
|
||||||
|
ft.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void updateNavigationBarState() {
|
private void updateNavigationBarState() {
|
||||||
int actionId = getNavigationMenuItemId();
|
int actionId = getNavigationMenuItemId();
|
||||||
selectBottomNavigationBarItem(actionId);
|
selectBottomNavigationBarItem(actionId);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.uam.wmi.findmytutor.activity;
|
package com.uam.wmi.findmytutor.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -21,6 +22,7 @@ import java.util.Set;
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
public class SharingFragment extends PreferenceFragment {
|
public class SharingFragment extends PreferenceFragment {
|
||||||
|
@SuppressLint("ResourceType")
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(final Bundle savedInstanceState) {
|
public void onCreate(final Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@ -46,6 +48,13 @@ public class SharingFragment extends PreferenceFragment {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static SharingFragment newInstance() {
|
||||||
|
|
||||||
|
return new SharingFragment();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View view = super.onCreateView(inflater, container, savedInstanceState);
|
View view = super.onCreateView(inflater, container, savedInstanceState);
|
||||||
|
@ -53,19 +53,28 @@ public class UsersListActivity extends Fragment {
|
|||||||
CoordinatorLayout coordinatorLayout;
|
CoordinatorLayout coordinatorLayout;
|
||||||
@BindView(R.id.recycler_view)
|
@BindView(R.id.recycler_view)
|
||||||
RecyclerView recyclerView;
|
RecyclerView recyclerView;
|
||||||
|
@BindView(R.id.txt_empty_notes_view)
|
||||||
|
TextView noNotesView;
|
||||||
|
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
private TutorTabApi tutorTabService;
|
private TutorTabApi tutorTabService;
|
||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
private TutorsAdapter mAdapter;
|
private TutorsAdapter mAdapter;
|
||||||
private List<User> tutorsList = new ArrayList<>();
|
private List<User> tutorsList = new ArrayList<>();
|
||||||
|
private List<User> tutorsFiltered = new ArrayList<>();
|
||||||
|
|
||||||
|
public static UsersListActivity newInstance() {
|
||||||
|
|
||||||
|
return new UsersListActivity();
|
||||||
|
}
|
||||||
|
|
||||||
public UsersListActivity() {
|
public UsersListActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
mAdapter = new TutorsAdapter(getActivity().getApplicationContext(), tutorsList);
|
mAdapter = new TutorsAdapter(getActivity().getApplicationContext(), tutorsFiltered);
|
||||||
View view = inflater.inflate(R.layout.users_list, container, false);
|
View view = inflater.inflate(R.layout.users_list, container, false);
|
||||||
view.setBackgroundColor(getResources().getColor(android.R.color.white));
|
view.setBackgroundColor(getResources().getColor(android.R.color.white));
|
||||||
return view;
|
return view;
|
||||||
@ -81,11 +90,10 @@ public class UsersListActivity extends Fragment {
|
|||||||
tutorTabService = ApiClient.getClient(getActivity().getApplicationContext())
|
tutorTabService = ApiClient.getClient(getActivity().getApplicationContext())
|
||||||
.create(TutorTabApi.class);
|
.create(TutorTabApi.class);
|
||||||
|
|
||||||
|
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getActivity());
|
||||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getActivity().getApplicationContext());
|
|
||||||
recyclerView.setLayoutManager(mLayoutManager);
|
recyclerView.setLayoutManager(mLayoutManager);
|
||||||
recyclerView.setItemAnimator(new DefaultItemAnimator());
|
recyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||||
recyclerView.addItemDecoration(new MyDividerItemDecoration(getActivity().getApplicationContext(), LinearLayoutManager.VERTICAL, 16));
|
recyclerView.addItemDecoration(new MyDividerItemDecoration(getActivity(), LinearLayoutManager.VERTICAL, 16));
|
||||||
recyclerView.setAdapter(mAdapter);
|
recyclerView.setAdapter(mAdapter);
|
||||||
|
|
||||||
fetchAllTutors();
|
fetchAllTutors();
|
||||||
@ -94,21 +102,30 @@ public class UsersListActivity extends Fragment {
|
|||||||
recyclerView, new RecyclerTouchListener.ClickListener() {
|
recyclerView, new RecyclerTouchListener.ClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view, final int position) {
|
public void onClick(View view, final int position) {
|
||||||
showNoteDialog(true, tutorsList.get(position), position);
|
showNoteDialog(tutorsFiltered.get(position));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLongClick(View view, int position) {
|
public void onLongClick(View view, int position) {
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void searchUser( String textToSearch){
|
||||||
|
Log.e("SEARCH","textToSearch");
|
||||||
|
|
||||||
private void showNoteDialog(final boolean shouldUpdate, final User user, final int position) {
|
tutorsFiltered.clear();
|
||||||
|
tutorsFiltered.addAll(Stream.of(tutorsList).filter(t -> t.toSearchString().contains(textToSearch)).toList());
|
||||||
|
mAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showNoteDialog(final User user) {
|
||||||
LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getActivity().getApplicationContext());
|
LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getActivity().getApplicationContext());
|
||||||
View view = layoutInflaterAndroid.inflate(R.layout.note_dialog, null);
|
View view = layoutInflaterAndroid.inflate(R.layout.note_dialog, null);
|
||||||
|
|
||||||
AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(getActivity().getApplicationContext());
|
AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(getActivity());
|
||||||
alertDialogBuilderUserInput.setView(view);
|
alertDialogBuilderUserInput.setView(view);
|
||||||
|
|
||||||
alertDialogBuilderUserInput.setNegativeButton(R.string.cancel, (dialog, id) -> {
|
alertDialogBuilderUserInput.setNegativeButton(R.string.cancel, (dialog, id) -> {
|
||||||
@ -135,11 +152,13 @@ public class UsersListActivity extends Fragment {
|
|||||||
List<String> dutyHoursList = Stream.of(tutorTabViewModel.getDutyHours())
|
List<String> dutyHoursList = Stream.of(tutorTabViewModel.getDutyHours())
|
||||||
.map(DutyHourViewModel::getSummary).toList();
|
.map(DutyHourViewModel::getSummary).toList();
|
||||||
|
|
||||||
|
Log.e("DUTY",dutyHoursList.toString());
|
||||||
|
|
||||||
userRoom.setText(String.format("%s: %s", getString(R.string.userRoom), tutorTabViewModel.getRoom()));
|
userRoom.setText(String.format("%s: %s", getString(R.string.userRoom), tutorTabViewModel.getRoom()));
|
||||||
userEmail.setText(String.format("%s: %s", getString(R.string.userEmail), tutorTabViewModel.getEmailTutorTab()));
|
userEmail.setText(String.format("%s: %s", getString(R.string.userEmail), tutorTabViewModel.getEmailTutorTab()));
|
||||||
userNote.setText(String.format("%s: %s", getString(R.string.userNote), tutorTabViewModel.getNote()));
|
userNote.setText(String.format("%s: %s", getString(R.string.userNote), tutorTabViewModel.getNote()));
|
||||||
|
|
||||||
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(getActivity().getApplicationContext(),
|
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(getActivity(),
|
||||||
android.R.layout.simple_list_item_activated_1, dutyHoursList);
|
android.R.layout.simple_list_item_activated_1, dutyHoursList);
|
||||||
|
|
||||||
userDutyHours.setAdapter(arrayAdapter);
|
userDutyHours.setAdapter(arrayAdapter);
|
||||||
@ -183,10 +202,11 @@ public class UsersListActivity extends Fragment {
|
|||||||
.subscribeWith(new DisposableSingleObserver<List<User>>() {
|
.subscribeWith(new DisposableSingleObserver<List<User>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<User> users) {
|
public void onSuccess(List<User> users) {
|
||||||
//toggleEmptyNotes();
|
|
||||||
tutorsList.clear();
|
tutorsList.clear();
|
||||||
tutorsList.addAll(users);
|
tutorsList.addAll(users);
|
||||||
|
tutorsFiltered.addAll(users);
|
||||||
mAdapter.notifyDataSetChanged();
|
mAdapter.notifyDataSetChanged();
|
||||||
|
toggleEmptyNotes();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,13 +237,13 @@ public class UsersListActivity extends Fragment {
|
|||||||
snackbar.show();
|
snackbar.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* private void toggleEmptyNotes() {
|
private void toggleEmptyNotes() {
|
||||||
if (tutorsList.size() > 0) {
|
if (tutorsList.size() > 0) {
|
||||||
noNotesView.setVisibility(View.GONE);
|
noNotesView.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
noNotesView.setVisibility(View.VISIBLE);
|
noNotesView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
@ -254,4 +274,6 @@ public class UsersListActivity extends Fragment {
|
|||||||
public void onSaveInstanceState(Bundle outState) {
|
public void onSaveInstanceState(Bundle outState) {
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -15,7 +15,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
* User
|
* User
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class User extends BaseResponse{
|
public class User extends BaseResponse {
|
||||||
@SerializedName("isOnline")
|
@SerializedName("isOnline")
|
||||||
private Boolean isOnline = null;
|
private Boolean isOnline = null;
|
||||||
|
|
||||||
@ -107,6 +107,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get isOnline
|
* Get isOnline
|
||||||
|
*
|
||||||
* @return isOnline
|
* @return isOnline
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -125,6 +126,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get isUsingBlacklist
|
* Get isUsingBlacklist
|
||||||
|
*
|
||||||
* @return isUsingBlacklist
|
* @return isUsingBlacklist
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -143,6 +145,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get isUsingWhitelist
|
* Get isUsingWhitelist
|
||||||
|
*
|
||||||
* @return isUsingWhitelist
|
* @return isUsingWhitelist
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -169,6 +172,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get blacklist
|
* Get blacklist
|
||||||
|
*
|
||||||
* @return blacklist
|
* @return blacklist
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -195,6 +199,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get whitelist
|
* Get whitelist
|
||||||
|
*
|
||||||
* @return whitelist
|
* @return whitelist
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -213,6 +218,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get department
|
* Get department
|
||||||
|
*
|
||||||
* @return department
|
* @return department
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@ -231,6 +237,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get ldapLogin
|
* Get ldapLogin
|
||||||
|
*
|
||||||
* @return ldapLogin
|
* @return ldapLogin
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@ -249,6 +256,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get title
|
* Get title
|
||||||
|
*
|
||||||
* @return title
|
* @return title
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@ -267,6 +275,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get firstName
|
* Get firstName
|
||||||
|
*
|
||||||
* @return firstName
|
* @return firstName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@ -285,6 +294,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get lastName
|
* Get lastName
|
||||||
|
*
|
||||||
* @return lastName
|
* @return lastName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@ -303,6 +313,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get isActive
|
* Get isActive
|
||||||
|
*
|
||||||
* @return isActive
|
* @return isActive
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@ -321,6 +332,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get tutorTab
|
* Get tutorTab
|
||||||
|
*
|
||||||
* @return tutorTab
|
* @return tutorTab
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -347,6 +359,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get coordinates
|
* Get coordinates
|
||||||
|
*
|
||||||
* @return coordinates
|
* @return coordinates
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -365,6 +378,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
|
*
|
||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -383,6 +397,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get userName
|
* Get userName
|
||||||
|
*
|
||||||
* @return userName
|
* @return userName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -401,6 +416,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get normalizedUserName
|
* Get normalizedUserName
|
||||||
|
*
|
||||||
* @return normalizedUserName
|
* @return normalizedUserName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -419,6 +435,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get email
|
* Get email
|
||||||
|
*
|
||||||
* @return email
|
* @return email
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -437,6 +454,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get normalizedEmail
|
* Get normalizedEmail
|
||||||
|
*
|
||||||
* @return normalizedEmail
|
* @return normalizedEmail
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -455,6 +473,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get emailConfirmed
|
* Get emailConfirmed
|
||||||
|
*
|
||||||
* @return emailConfirmed
|
* @return emailConfirmed
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -473,6 +492,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get passwordHash
|
* Get passwordHash
|
||||||
|
*
|
||||||
* @return passwordHash
|
* @return passwordHash
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -491,6 +511,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get securityStamp
|
* Get securityStamp
|
||||||
|
*
|
||||||
* @return securityStamp
|
* @return securityStamp
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -509,6 +530,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get concurrencyStamp
|
* Get concurrencyStamp
|
||||||
|
*
|
||||||
* @return concurrencyStamp
|
* @return concurrencyStamp
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -527,6 +549,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get phoneNumber
|
* Get phoneNumber
|
||||||
|
*
|
||||||
* @return phoneNumber
|
* @return phoneNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -545,6 +568,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get phoneNumberConfirmed
|
* Get phoneNumberConfirmed
|
||||||
|
*
|
||||||
* @return phoneNumberConfirmed
|
* @return phoneNumberConfirmed
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -563,6 +587,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get twoFactorEnabled
|
* Get twoFactorEnabled
|
||||||
|
*
|
||||||
* @return twoFactorEnabled
|
* @return twoFactorEnabled
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -581,6 +606,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get lockoutEnd
|
* Get lockoutEnd
|
||||||
|
*
|
||||||
* @return lockoutEnd
|
* @return lockoutEnd
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -599,6 +625,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get lockoutEnabled
|
* Get lockoutEnabled
|
||||||
|
*
|
||||||
* @return lockoutEnabled
|
* @return lockoutEnabled
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -617,6 +644,7 @@ public class User extends BaseResponse{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get accessFailedCount
|
* Get accessFailedCount
|
||||||
|
*
|
||||||
* @return accessFailedCount
|
* @return accessFailedCount
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -674,6 +702,16 @@ public class User extends BaseResponse{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String toSearchString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(userName);
|
||||||
|
sb.append(lastName);
|
||||||
|
sb.append(department);
|
||||||
|
sb.append(email);
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -16,6 +16,17 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_empty_notes_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="@dimen/margin_top_no_notes"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:text="@string/there_is_no_users_in_system"
|
||||||
|
android:textColor="@color/msg_no_notes"
|
||||||
|
android:textSize="@dimen/msg_no_notes" />
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user