use of com.owncloud.android.ui.adapter.ShareUserListAdapter in project android by owncloud.
the class SearchShareesFragment method updateListOfUserGroups.
private void updateListOfUserGroups() {
// Update list of users/groups
// TODO Refactoring: create a new {@link ShareUserListAdapter} instance with every call should not be needed
mUserGroupsAdapter = new ShareUserListAdapter(getActivity().getApplicationContext(), R.layout.share_user_item, mShares, this);
// Show data
ListView usersList = (ListView) getView().findViewById(R.id.searchUsersListView);
if (mShares.size() > 0) {
usersList.setVisibility(View.VISIBLE);
usersList.setAdapter(mUserGroupsAdapter);
} else {
usersList.setVisibility(View.GONE);
}
}
use of com.owncloud.android.ui.adapter.ShareUserListAdapter in project android by owncloud.
the class ShareFileFragment method updateListOfUserGroups.
private void updateListOfUserGroups() {
// Update list of users/groups
// TODO Refactoring: create a new {@link ShareUserListAdapter} instance with every call should not be needed
mUserGroupsAdapter = new ShareUserListAdapter(getActivity(), R.layout.share_user_item, mPrivateShares, this);
// Show data
TextView noShares = (TextView) getView().findViewById(R.id.shareNoUsers);
ListView usersList = (ListView) getView().findViewById(R.id.shareUsersList);
if (mPrivateShares.size() > 0) {
noShares.setVisibility(View.GONE);
usersList.setVisibility(View.VISIBLE);
usersList.setAdapter(mUserGroupsAdapter);
setListViewHeightBasedOnChildren(usersList);
} else {
noShares.setVisibility(View.VISIBLE);
usersList.setVisibility(View.GONE);
}
// Set Scroll to initial position
ScrollView scrollView = (ScrollView) getView().findViewById(R.id.shareScroll);
scrollView.scrollTo(0, 0);
}
use of com.owncloud.android.ui.adapter.ShareUserListAdapter in project android by nextcloud.
the class SearchShareesFragment method updateListOfUserGroups.
private void updateListOfUserGroups() {
// Update list of users/groups
// TODO Refactoring: create a new {@link ShareUserListAdapter} instance with every call should not be needed
ShareUserListAdapter userGroupsAdapter = new ShareUserListAdapter(getActivity().getApplicationContext(), R.layout.share_user_item, mShares, this);
// Show data
ListView usersList = (ListView) getView().findViewById(R.id.searchUsersListView);
if (mShares.size() > 0) {
usersList.setVisibility(View.VISIBLE);
usersList.setAdapter(userGroupsAdapter);
} else {
usersList.setVisibility(View.GONE);
}
}
use of com.owncloud.android.ui.adapter.ShareUserListAdapter in project android by nextcloud.
the class ShareFileFragment method updateListOfUserGroups.
private void updateListOfUserGroups() {
// Update list of users/groups
// TODO Refactoring: create a new {@link ShareUserListAdapter} instance with every call should not be needed
ShareUserListAdapter mUserGroupsAdapter = new ShareUserListAdapter(getActivity(), R.layout.share_user_item, mPrivateShares, this);
// Show data
TextView noShares = (TextView) getView().findViewById(R.id.shareNoUsers);
ListView usersList = (ListView) getView().findViewById(R.id.shareUsersList);
if (mPrivateShares.size() > 0) {
noShares.setVisibility(View.GONE);
usersList.setVisibility(View.VISIBLE);
usersList.setAdapter(mUserGroupsAdapter);
setListViewHeightBasedOnChildren(usersList);
} else {
noShares.setVisibility(View.VISIBLE);
usersList.setVisibility(View.GONE);
}
// Set Scroll to initial position
ScrollView scrollView = (ScrollView) getView().findViewById(R.id.shareScroll);
scrollView.scrollTo(0, 0);
}
Aggregations