use of com.example.c4q.capstone.utils.SimpleDividerItemDecoration in project Grupp by tmoronta1208.
the class CreateEventInviteFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_create_event_invite, container, false);
recyclerView = (RecyclerView) rootView.findViewById(R.id.invite_recycler_view);
// friendsAdapter = new FriendsAdapter(friendsUserList,eventPresenter, getActivity().getApplicationContext());
linearLayoutManager = new LinearLayoutManager(getActivity().getApplicationContext());
recyclerView.setAdapter(contactListAdapter);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getContext()));
getFriendUsers();
return rootView;
}
use of com.example.c4q.capstone.utils.SimpleDividerItemDecoration in project Grupp by tmoronta1208.
the class InvitedFriendsFragment method convertIdsToUsers.
public void convertIdsToUsers(ArrayList<String> invitedList) {
friendsUserIDList = new ArrayList<>();
friendsUserIDList.addAll(invitedList);
Log.d("UserFriends Fragment", "convertIdsTousers");
if (friendsUserIDList != null) {
if (friendsUserIDList.size() != 0) {
for (String s : friendsUserIDList) {
userDataUtility.getPublicUser(s, new FBUserDataListener() {
@Override
public void getUid(String userID) {
}
@Override
public void getPublicUser(PublicUser publicUser) {
friendsUserList.add(publicUser);
}
});
}
if (friendsUserList != null) {
if (getActivity() != null) {
contactListAdapter = new ContactListAdapter(PublicUserDetails.class, R.layout.contact_item_view, ContactListViewHolder.class, contactsRef);
linearLayoutManager = new LinearLayoutManager(getActivity().getApplicationContext());
recyclerView.setAdapter(contactListAdapter);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getContext()));
}
}
}
} else {
}
}
use of com.example.c4q.capstone.utils.SimpleDividerItemDecoration in project Grupp by tmoronta1208.
the class ContactListFragment method onCreateView.
/* public static ContactListFragment newInstance(String title) {
ContactListFragment fragment = new ContactListFragment();
Bundle args = new Bundle();
args.putString("title", title);
fragment.setArguments(args);
return fragment;
}*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
view = inflater.inflate(R.layout.fragment_contactlist, container, false);
searchView = view.findViewById(R.id.search_bar_cl);
searchView.setHint("Name, #Grupptag, Email");
searchView.setHintTextColor(getActivity().getResources().getColor(R.color.hintcolor));
String currentUserId = CurrentUser.getInstance().getUserID();
DatabaseReference contactsRef = FirebaseDatabase.getInstance().getReference().child(USER_CONTACTS).child(currentUserId);
recyclerView = view.findViewById(R.id.contact_list_rec);
recyclerView.setHasFixedSize(true);
LinearLayoutManager linearLayout = new LinearLayoutManager(view.getContext());
contactListAdapter = new ContactListAdapter(PublicUserDetails.class, R.layout.contact_item_view, ContactListViewHolder.class, contactsRef);
/**
*ajoxe:
* after modifying the adapter, set the list as friendsUserList
* contactListAdapter = new ContactListAdapter(friendsUserList, getContext());
*/
recyclerView.setAdapter(contactListAdapter);
recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getContext()));
recyclerView.setLayoutManager(linearLayout);
return view;
}
use of com.example.c4q.capstone.utils.SimpleDividerItemDecoration in project Grupp by tmoronta1208.
the class VenueFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
rootView = inflater.inflate(R.layout.fragment_venue, container, false);
venueRecyclerView = rootView.findViewById(R.id.venue_recycler_view);
linearLayoutManager = new LinearLayoutManager(context);
linearLayoutManager.setStackFromEnd(true);
linearLayoutManager.setReverseLayout(true);
venueRecyclerView.setAdapter(firebaseRecyclerAdapter);
venueRecyclerView.setLayoutManager(linearLayoutManager);
venueRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(getContext()));
venueName = (TextView) rootView.findViewById(R.id.venue_name_textview);
venueAddress = (TextView) rootView.findViewById(R.id.venue_address_textview);
venueVoteCount = (TextView) rootView.findViewById(R.id.venue_vote_textview);
venuePhoto = (ImageView) rootView.findViewById(R.id.venue_photo_image_view);
getEventData();
return rootView;
}
use of com.example.c4q.capstone.utils.SimpleDividerItemDecoration in project Grupp by tmoronta1208.
the class UPEventsFragment method onCreateView.
/* public static UPEventsFragment newInstance(String title) {
UPEventsFragment fragment = new UPEventsFragment();
Bundle args = new Bundle();
args.putString("title", title);
fragment.setArguments(args);
return fragment;
}*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
view = inflater.inflate(R.layout.fragment_events, container, false);
String currentUserID = CurrentUser.getInstance().getUserID();
rootRef = FirebaseDatabase.getInstance().getReference();
eventsRef = rootRef.child(USER_EVENTS_LIST).child(currentUserID);
recyclerView = view.findViewById(R.id.events_rec);
recyclerView.setHasFixedSize(true);
LinearLayoutManager linearLayout = new LinearLayoutManager(view.getContext());
linearLayout.setStackFromEnd(true);
linearLayout.setReverseLayout(true);
recyclerView.setLayoutManager(linearLayout);
eventsAdapter = new EventsAdapter(Events.class, R.layout.events_item_view, EventsViewHolder.class, eventsRef);
recyclerView.setAdapter(eventsAdapter);
recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getContext()));
return view;
}
Aggregations