Search in sources :

Example 1 with ContactListAdapter

use of com.xabber.android.ui.adapter.ContactListAdapter 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;
}
Also used : AccountActionButtonsAdapter(com.xabber.android.ui.adapter.AccountActionButtonsAdapter) ContactListAdapter(com.xabber.android.ui.adapter.ContactListAdapter) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) ListView(android.widget.ListView) LinearLayout(android.widget.LinearLayout)

Aggregations

View (android.view.View)1 AdapterView (android.widget.AdapterView)1 LinearLayout (android.widget.LinearLayout)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 AccountActionButtonsAdapter (com.xabber.android.ui.adapter.AccountActionButtonsAdapter)1 ContactListAdapter (com.xabber.android.ui.adapter.ContactListAdapter)1