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);
}
}
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());
}
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);
}
}
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);
}
}
Aggregations