use of com.waz.zclient.pages.main.participants.ProfileTabletAnimation in project wire-android by wireapp.
the class PendingConnectRequestFragment method onCreateAnimation.
//////////////////////////////////////////////////////////////////////////////////////////
//
// Lifecycle
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
Animation animation = super.onCreateAnimation(transit, enter, nextAnim);
if (getControllerFactory().getConversationScreenController().getPopoverLaunchMode() != DialogLaunchMode.AVATAR && getControllerFactory().getConversationScreenController().getPopoverLaunchMode() != DialogLaunchMode.COMMON_USER) {
// No animation when request is shown in conversation list
IConnectStore.UserRequester userRequester = IConnectStore.UserRequester.valueOf(getArguments().getString(ARGUMENT_USER_REQUESTER));
if (userRequester != IConnectStore.UserRequester.CONVERSATION || isBelowUserProfile) {
int centerX = ViewUtils.getOrientationIndependentDisplayWidth(getActivity()) / 2;
int centerY = ViewUtils.getOrientationIndependentDisplayHeight(getActivity()) / 2;
int duration;
int delay = 0;
if (isBelowUserProfile) {
if (LayoutSpec.isTablet(getActivity())) {
animation = new ProfileTabletAnimation(enter, getResources().getInteger(R.integer.framework_animation_duration_long), -getResources().getDimensionPixelSize(R.dimen.participant_dialog__initial_width));
} else {
if (enter) {
isBelowUserProfile = false;
duration = getResources().getInteger(R.integer.reopen_profile_source__animation_duration);
delay = getResources().getInteger(R.integer.reopen_profile_source__delay);
} else {
duration = getResources().getInteger(R.integer.reopen_profile_source__animation_duration);
}
animation = new ProfileSourceAnimation(enter, duration, delay, centerX, centerY);
}
} else if (nextAnim != 0) {
if (LayoutSpec.isTablet(getActivity())) {
animation = new ProfileTabletAnimation(enter, getResources().getInteger(R.integer.framework_animation_duration_long), getResources().getDimensionPixelSize(R.dimen.participant_dialog__initial_width));
} else {
if (enter) {
duration = getResources().getInteger(R.integer.open_profile__animation_duration);
delay = getResources().getInteger(R.integer.open_profile__delay);
} else {
duration = getResources().getInteger(R.integer.close_profile__animation_duration);
}
animation = new ProfileAnimation(enter, duration, delay, centerX, centerY);
}
}
}
}
return animation;
}
use of com.waz.zclient.pages.main.participants.ProfileTabletAnimation in project wire-android by wireapp.
the class SendConnectRequestFragment method onCreateAnimation.
//////////////////////////////////////////////////////////////////////////////////////////
//
// Lifecycle
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
Animation animation = super.onCreateAnimation(transit, enter, nextAnim);
if (getControllerFactory().getConversationScreenController().getPopoverLaunchMode() != DialogLaunchMode.AVATAR && getControllerFactory().getConversationScreenController().getPopoverLaunchMode() != DialogLaunchMode.COMMON_USER) {
int centerX = ViewUtils.getOrientationIndependentDisplayWidth(getActivity()) / 2;
int centerY = ViewUtils.getOrientationIndependentDisplayHeight(getActivity()) / 2;
int duration;
int delay = 0;
if (isBelowUserProfile) {
if (LayoutSpec.isTablet(getActivity())) {
animation = new ProfileTabletAnimation(enter, getResources().getInteger(R.integer.framework_animation_duration_long), -getResources().getDimensionPixelSize(R.dimen.participant_dialog__initial_width));
} else {
if (enter) {
isBelowUserProfile = false;
duration = getResources().getInteger(R.integer.reopen_profile_source__animation_duration);
delay = getResources().getInteger(R.integer.reopen_profile_source__delay);
} else {
duration = getResources().getInteger(R.integer.reopen_profile_source__animation_duration);
}
animation = new ProfileSourceAnimation(enter, duration, delay, centerX, centerY);
}
} else if (nextAnim != 0) {
if (LayoutSpec.isTablet(getActivity())) {
animation = new ProfileTabletAnimation(enter, getResources().getInteger(R.integer.framework_animation_duration_long), getResources().getDimensionPixelSize(R.dimen.participant_dialog__initial_width));
} else {
if (enter) {
duration = getResources().getInteger(R.integer.open_profile__animation_duration);
delay = getResources().getInteger(R.integer.open_profile__delay);
} else {
duration = getResources().getInteger(R.integer.close_profile__animation_duration);
}
animation = new ProfileAnimation(enter, duration, delay, centerX, centerY);
}
}
}
return animation;
}
use of com.waz.zclient.pages.main.participants.ProfileTabletAnimation in project wire-android by wireapp.
the class BlockedUserProfileFragment method onCreateAnimation.
//////////////////////////////////////////////////////////////////////////////////////////
//
// Lifecycle
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
Animation animation = super.onCreateAnimation(transit, enter, nextAnim);
if (getControllerFactory().getConversationScreenController().getPopoverLaunchMode() != DialogLaunchMode.AVATAR && getControllerFactory().getConversationScreenController().getPopoverLaunchMode() != DialogLaunchMode.COMMON_USER) {
int centerX = ViewUtils.getOrientationIndependentDisplayWidth(getActivity()) / 2;
int centerY = ViewUtils.getOrientationIndependentDisplayHeight(getActivity()) / 2;
int duration;
int delay = 0;
// Fade out animation when starting conversation directly with this user when unblocking
if (!goToConversationWithUser || enter) {
if (isBelowUserProfile) {
if (LayoutSpec.isTablet(getActivity())) {
animation = new ProfileTabletAnimation(enter, getResources().getInteger(R.integer.framework_animation_duration_long), -getResources().getDimensionPixelSize(R.dimen.participant_dialog__initial_width));
} else {
if (enter) {
isBelowUserProfile = false;
duration = getResources().getInteger(R.integer.reopen_profile_source__animation_duration);
delay = getResources().getInteger(R.integer.reopen_profile_source__delay);
} else {
duration = getResources().getInteger(R.integer.reopen_profile_source__animation_duration);
}
animation = new ProfileSourceAnimation(enter, duration, delay, centerX, centerY);
}
} else if (nextAnim != 0) {
if (LayoutSpec.isTablet(getActivity())) {
animation = new ProfileTabletAnimation(enter, getResources().getInteger(R.integer.framework_animation_duration_long), getResources().getDimensionPixelSize(R.dimen.participant_dialog__initial_width));
} else {
if (enter) {
duration = getResources().getInteger(R.integer.open_profile__animation_duration);
delay = getResources().getInteger(R.integer.open_profile__delay);
} else {
duration = getResources().getInteger(R.integer.close_profile__animation_duration);
}
animation = new ProfileAnimation(enter, duration, delay, centerX, centerY);
}
}
} else {
goToConversationWithUser = false;
duration = getResources().getInteger(R.integer.framework_animation_duration_medium);
animation = new FadeAnimation(duration, 1, 0);
}
}
return animation;
}
Aggregations