use of com.xabber.android.ui.adapter.AccountActionButtonsAdapter in project xabber-android by redsolution.
the class ContactListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.contact_list_fragment, container, false);
// to avoid strange bug on some 4.x androids
view.setBackgroundColor(ColorManager.getInstance().getContactListBackgroundColor());
listView = (ListView) view.findViewById(android.R.id.list);
listView.setOnItemClickListener(this);
listView.setItemsCanFocus(true);
registerForContextMenu(listView);
adapter = new ContactListAdapter(getActivity(), this, this);
listView.setAdapter(adapter);
infoView = view.findViewById(R.id.info);
connectedView = infoView.findViewById(R.id.connected);
disconnectedView = infoView.findViewById(R.id.disconnected);
textView = (TextView) infoView.findViewById(R.id.text);
buttonView = (Button) infoView.findViewById(R.id.button);
animation = AnimationUtils.loadAnimation(getActivity(), R.anim.connection);
accountActionButtonsAdapter = new AccountActionButtonsAdapter(getActivity(), this, (LinearLayout) view.findViewById(R.id.account_action_buttons));
accountActionButtonsAdapter.onChange();
actionButtonsContainer = view.findViewById(R.id.account_action_buttons_container);
scrollToChatsActionButtonContainer = view.findViewById(R.id.fab_up_container);
scrollToChatsActionButtonContainer.setOnClickListener(this);
scrollToChatsActionButtonContainer.setVisibility(View.GONE);
scrollToChatsActionButton = (FloatingActionButton) view.findViewById(R.id.fab_up);
accountPainter = ColorManager.getInstance().getAccountPainter();
scrollToChatsActionButton.setColorNormal(accountPainter.getDefaultMainColor());
scrollToChatsActionButton.setColorPressed(accountPainter.getDefaultDarkColor());
return view;
}
Aggregations