private void setUserSearchResult(final UsersSearchResult userSearchResult) { mUsersSearchResult = userSearchResult; getActionBarActivity() .getSupportActionBar() .setTitle( getString(R.string.title_user_nick_selection_result, userSearchResult.getNickName())); if (null == mUsersAdapter) { mUsersAdapter = new UsersAdapter(getActivity(), userSearchResult.getUsers()); } else { mUsersAdapter.setUsers(userSearchResult.getUsers()); } if (null == mUserAccountsListView.getAdapter()) { mUserAccountsListView.setAdapter(mUsersAdapter); } mUserAccountsListView.setVisibility(mUsersAdapter.getCount() == 0 ? View.GONE : View.VISIBLE); mEmptyTextView.setVisibility(mUsersAdapter.getCount() == 0 ? View.VISIBLE : View.GONE); mEmptyTextView.setText( getString(R.string.text_no_users_found_for, userSearchResult.getNickName())); }