Search in sources :

Example 1 with ConversationUtil

use of dev.sagar.smsblocker.tech.utils.ConversationUtil 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)

Example 2 with ConversationUtil

use of dev.sagar.smsblocker.tech.utils.ConversationUtil in project SMSBlocker by sagarpawardev.

the class IntroActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_intro);
    loadingViewHolder = findViewById(R.id.loading_view_holder);
    prefs = getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
    boolean introShown = prefs.getBoolean(KEY_DONE_FLAG, false);
    if (introShown) {
        // finish() included in this
        startHomeActivity();
    }
    convUtil = new ConversationUtil(this, this);
    /*btnDefault = (Button) findViewById(R.id.btn_default);
        btnDefault.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                permUtil.askToMakeAppDefault(IntroActivity.this);
            }
        });*/
    pager = (ViewPager) findViewById(R.id.vp_holder);
    VPIntroAdapter cadapter = new VPIntroAdapter(this);
    pager.setAdapter(cadapter);
    btnNext = (Button) findViewById(R.id.btn_next);
    // btnSkip = (Button) findViewById(R.id.btn_skip);
    btnNext.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            moveToNext();
        }
    });
/*btnNext.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                moveToNext();
            }
        });*/
}
Also used : VPIntroAdapter(dev.sagar.smsblocker.ux.adapters.VPIntroAdapter) ConversationUtil(dev.sagar.smsblocker.tech.utils.ConversationUtil) View(android.view.View)

Aggregations

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