Search in sources :

Example 1 with QmsContactsAdapter

use of forpdateam.ru.forpda.ui.fragments.qms.adapters.QmsContactsAdapter in project ForPDA by RadiationX.

the class QmsBlackListFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    viewsReady();
    nickField.addTextChangedListener(new SimpleTextWatcher() {

        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            searchUser(s.toString());
        }
    });
    refreshLayout.setOnRefreshListener(this::loadData);
    recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    adapter = new QmsContactsAdapter();
    recyclerView.setAdapter(adapter);
    adapter.setOnItemClickListener(this);
}
Also used : SimpleTextWatcher(forpdateam.ru.forpda.common.simple.SimpleTextWatcher) QmsContactsAdapter(forpdateam.ru.forpda.ui.fragments.qms.adapters.QmsContactsAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 2 with QmsContactsAdapter

use of forpdateam.ru.forpda.ui.fragments.qms.adapters.QmsContactsAdapter in project ForPDA by RadiationX.

the class QmsContactsFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    viewsReady();
    initFabBehavior();
    refreshLayoutStyle(refreshLayout);
    refreshLayout.setOnRefreshListener(this::loadData);
    recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    PauseOnScrollListener pauseOnScrollListener = new PauseOnScrollListener(ImageLoader.getInstance(), true, true);
    recyclerView.addOnScrollListener(pauseOnScrollListener);
    fab.setImageDrawable(App.getVecDrawable(getContext(), R.drawable.ic_fab_create));
    fab.setOnClickListener(view1 -> TabManager.get().add(QmsChatFragment.class));
    fab.setVisibility(View.VISIBLE);
    adapter = new QmsContactsAdapter();
    adapter.setOnItemClickListener(this);
    recyclerView.setAdapter(adapter);
    bindView();
    QmsHelper.get().subscribeQms(notification);
}
Also used : PauseOnScrollListener(forpdateam.ru.forpda.ui.views.PauseOnScrollListener) QmsContactsAdapter(forpdateam.ru.forpda.ui.fragments.qms.adapters.QmsContactsAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) QmsChatFragment(forpdateam.ru.forpda.ui.fragments.qms.chat.QmsChatFragment)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 QmsContactsAdapter (forpdateam.ru.forpda.ui.fragments.qms.adapters.QmsContactsAdapter)2 SimpleTextWatcher (forpdateam.ru.forpda.common.simple.SimpleTextWatcher)1 QmsChatFragment (forpdateam.ru.forpda.ui.fragments.qms.chat.QmsChatFragment)1 PauseOnScrollListener (forpdateam.ru.forpda.ui.views.PauseOnScrollListener)1