Search in sources :

Example 1 with RVHomeAdapter

use of dev.sagar.smsblocker.ux.adapters.RVHomeAdapter in project SMSBlocker by sagarpawardev.

the class HomeActivity method init.

private void init() {
    fab = (FloatingActionButton) findViewById(R.id.fab);
    notificationView = (NotificationView) findViewById(R.id.notificationView);
    recyclerView = (RecyclerView) findViewById(R.id.lv_threads);
    viewPlaceHolder = findViewById(R.id.holder_placeholder);
    switchUnread = (SwitchCompat) findViewById(R.id.switch_unread);
    tvTotalCount = (TextView) findViewById(R.id.tv_total_count);
    holderLoader = findViewById(R.id.holder_loader);
    holderMain = findViewById(R.id.holder_main);
    holderSwitch = findViewById(R.id.holder_switch);
    // if(inboxUtil == null) inboxUtil = new InboxUtil(this);
    if (conversationUtil == null)
        conversationUtil = new ConversationUtil(this, this);
    adapter = new RVHomeAdapter(this, conversationMap, this);
    amCallback = new AMCallbackHome(adapter);
    smsReceiver = new LocalSMSReceivedReceiver(this);
    RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
    recyclerView.setLayoutManager(mLayoutManager);
    recyclerView.setAdapter(adapter);
    setFont();
}
Also used : LocalSMSReceivedReceiver(dev.sagar.smsblocker.tech.broadcastreceivers.LocalSMSReceivedReceiver) RVHomeAdapter(dev.sagar.smsblocker.ux.adapters.RVHomeAdapter) ConversationUtil(dev.sagar.smsblocker.tech.utils.ConversationUtil) RecyclerView(android.support.v7.widget.RecyclerView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) AMCallbackHome(dev.sagar.smsblocker.ux.listeners.actionmodecallbacks.AMCallbackHome)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 LocalSMSReceivedReceiver (dev.sagar.smsblocker.tech.broadcastreceivers.LocalSMSReceivedReceiver)1 ConversationUtil (dev.sagar.smsblocker.tech.utils.ConversationUtil)1 RVHomeAdapter (dev.sagar.smsblocker.ux.adapters.RVHomeAdapter)1 AMCallbackHome (dev.sagar.smsblocker.ux.listeners.actionmodecallbacks.AMCallbackHome)1