use of com.applozic.mobicomkit.uiwidgets.conversation.adapter.QuickConversationAdapter in project Applozic-Android-SDK by AppLozic.
the class MobiComQuickConversationFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View list = inflater.inflate(R.layout.mobicom_message_list, container, false);
recyclerView = (RecyclerView) list.findViewById(R.id.messageList);
recyclerView.setBackgroundColor(getResources().getColor(R.color.conversation_list_all_background));
if (messageList != null && !messageList.contains(null)) {
messageList.add(null);
}
recyclerAdapter = new QuickConversationAdapter(getContext(), messageList, null);
recyclerAdapter.setAlCustomizationSettings(alCustomizationSettings);
linearLayoutManager = new AlLinearLayoutManager(getContext());
linearLayoutManager.setOrientation(AlLinearLayoutManager.VERTICAL);
recyclerView.setLayoutManager(linearLayoutManager);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext());
recyclerView.addItemDecoration(dividerItemDecoration);
recyclerView.setAdapter(recyclerAdapter);
toolbar = (Toolbar) getActivity().findViewById(R.id.my_toolbar);
toolbar.setClickable(false);
fabButton = (ImageButton) list.findViewById(R.id.fab_start_new);
loading = true;
LinearLayout individualMessageSendLayout = (LinearLayout) list.findViewById(R.id.individual_message_send_layout);
LinearLayout extendedSendingOptionLayout = (LinearLayout) list.findViewById(R.id.extended_sending_option_layout);
individualMessageSendLayout.setVisibility(View.GONE);
extendedSendingOptionLayout.setVisibility(View.GONE);
emptyTextView = (TextView) list.findViewById(R.id.noConversations);
emptyTextView.setTextColor(Color.parseColor(alCustomizationSettings.getNoConversationLabelTextColor().trim()));
fabButton.setVisibility(alCustomizationSettings.isStartNewFloatingButton() ? View.VISIBLE : View.GONE);
swipeLayout = (SwipeRefreshLayout) list.findViewById(R.id.swipe_container);
swipeLayout.setColorScheme(android.R.color.holo_blue_bright, android.R.color.holo_green_light, android.R.color.holo_orange_light, android.R.color.holo_red_light);
recyclerView.setLongClickable(true);
registerForContextMenu(recyclerView);
((CustomToolbarListener) getActivity()).setToolbarTitle(ApplozicService.getContext(getContext()).getString(R.string.conversation));
return list;
}
Aggregations