use of im.actor.sdk.intents.ActorIntent in project actor-platform by actorapp.
the class ActorSDK method returnToRoot.
public static void returnToRoot(Context context) {
Intent i;
ActorIntent startIntent = ActorSDK.sharedActor().getDelegate().getStartIntent();
if (startIntent != null && startIntent instanceof ActorIntentActivity) {
i = ((ActorIntentActivity) startIntent).getIntent();
} else {
i = new Intent(context, RootActivity.class);
}
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
context.startActivity(i);
}
use of im.actor.sdk.intents.ActorIntent in project actor-platform by actorapp.
the class MyProfileActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
getSupportActionBar().setTitle(null);
if (savedInstanceState == null) {
BaseActorSettingsFragment fragment;
if (ActorSDK.sharedActor().getDelegate().getSettingsIntent() != null) {
ActorIntent settingsIntent = ActorSDK.sharedActor().getDelegate().getSettingsIntent();
if (settingsIntent instanceof BaseActorSettingsActivity) {
fragment = ((BaseActorSettingsActivity) settingsIntent).getSettingsFragment();
} else {
fragment = new ActorSettingsFragment();
}
} else {
fragment = new ActorSettingsFragment();
}
showFragment(fragment, false);
}
}
use of im.actor.sdk.intents.ActorIntent in project actor-platform by actorapp.
the class ChatSettingsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().setTitle(R.string.settings_chat_title);
ChatSettingsFragment fragment;
ActorIntent chatSettingsIntent = ActorSDK.sharedActor().getDelegate().getChatSettingsIntent();
if (chatSettingsIntent != null && chatSettingsIntent instanceof ActorIntentFragmentActivity) {
fragment = (ChatSettingsFragment) ((ActorIntentFragmentActivity) chatSettingsIntent).getFragment();
} else {
fragment = new ChatSettingsFragment();
}
if (savedInstanceState == null) {
showFragment(fragment, false);
}
}
Aggregations