Search in sources :

Example 1 with HomeActivity

use of cx.ring.client.HomeActivity in project ring-client-android by savoirfairelinux.

the class ContactRequestsFragment method onResume.

@Override
public void onResume() {
    super.onResume();
    ((HomeActivity) getActivity()).setToolbarState(false, R.string.menu_item_contact_request);
    Bundle arguments = getArguments();
    if (arguments != null && arguments.containsKey(ACCOUNT_ID)) {
        presenter.updateAccount(getArguments().getString(ACCOUNT_ID), true);
    }
}
Also used : HomeActivity(cx.ring.client.HomeActivity) Bundle(android.os.Bundle)

Example 2 with HomeActivity

use of cx.ring.client.HomeActivity in project ring-client-android by savoirfairelinux.

the class AccountsManagementFragment method onResume.

@Override
public void onResume() {
    super.onResume();
    ((HomeActivity) getActivity()).setToolbarState(true, R.string.menu_item_accounts);
    FloatingActionButton button = ((HomeActivity) getActivity()).getActionButton();
    button.setImageResource(R.drawable.ic_add_white);
    button.setOnClickListener(v -> presenter.addClicked());
}
Also used : HomeActivity(cx.ring.client.HomeActivity) FloatingActionButton(android.support.design.widget.FloatingActionButton)

Example 3 with HomeActivity

use of cx.ring.client.HomeActivity in project ring-client-android by savoirfairelinux.

the class SmartListFragment method goToConversation.

@Override
public void goToConversation(String accountId, String contactId) {
    if (mSearchMenuItem != null) {
        mSearchMenuItem.collapseActionView();
    }
    if (!isTabletMode) {
        Intent intent = new Intent().setClass(getActivity(), ConversationActivity.class).setAction(Intent.ACTION_VIEW).putExtra(ConversationFragment.KEY_ACCOUNT_ID, accountId).putExtra(ConversationFragment.KEY_CONTACT_RING_ID, contactId);
        startActivity(intent);
    } else {
        Bundle bundle = new Bundle();
        bundle.putString(ConversationFragment.KEY_CONTACT_RING_ID, contactId);
        bundle.putString(ConversationFragment.KEY_ACCOUNT_ID, accountId);
        ((HomeActivity) getActivity()).startConversationTablet(bundle);
    }
}
Also used : ConversationActivity(cx.ring.client.ConversationActivity) HomeActivity(cx.ring.client.HomeActivity) Bundle(android.os.Bundle) Intent(android.content.Intent)

Example 4 with HomeActivity

use of cx.ring.client.HomeActivity in project ring-client-android by savoirfairelinux.

the class ContactRequestsFragment method goToConversation.

@Override
public void goToConversation(String accountId, String contactId) {
    if (DeviceUtils.isTablet(getActivity())) {
        Bundle bundle = new Bundle();
        bundle.putString(ConversationFragment.KEY_CONTACT_RING_ID, contactId);
        bundle.putString(ConversationFragment.KEY_ACCOUNT_ID, accountId);
        ((HomeActivity) getActivity()).startConversationTablet(bundle);
    } else {
        Intent intent = new Intent().setClass(getActivity(), ConversationActivity.class).setAction(Intent.ACTION_VIEW).putExtra(ConversationFragment.KEY_ACCOUNT_ID, accountId).putExtra(ConversationFragment.KEY_CONTACT_RING_ID, contactId);
        startActivity(intent);
    }
}
Also used : ConversationActivity(cx.ring.client.ConversationActivity) HomeActivity(cx.ring.client.HomeActivity) Bundle(android.os.Bundle) Intent(android.content.Intent)

Aggregations

HomeActivity (cx.ring.client.HomeActivity)4 Bundle (android.os.Bundle)3 Intent (android.content.Intent)2 ConversationActivity (cx.ring.client.ConversationActivity)2 FloatingActionButton (android.support.design.widget.FloatingActionButton)1