use of com.android.systemui.recents.misc.ReferenceCountedTrigger in project android_frameworks_base by ResurrectionRemix.
the class RecentsView method showStackActionButton.
/**
* Shows the stack action button.
*/
private void showStackActionButton(final int duration, final boolean translate) {
if (!RecentsDebugFlags.Static.EnableStackActionButton) {
return;
}
if (!showClearAllRecents) {
final ReferenceCountedTrigger postAnimationTrigger = new ReferenceCountedTrigger();
if (mStackActionButton.getVisibility() == View.INVISIBLE) {
mStackActionButton.setVisibility(View.VISIBLE);
mStackActionButton.setAlpha(0f);
if (translate) {
mStackActionButton.setTranslationY(-mStackActionButton.getMeasuredHeight() * 0.25f);
} else {
mStackActionButton.setTranslationY(0f);
}
postAnimationTrigger.addLastDecrementRunnable(new Runnable() {
@Override
public void run() {
if (translate) {
mStackActionButton.animate().translationY(0f);
}
mStackActionButton.animate().alpha(1f).setDuration(duration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).start();
}
});
}
postAnimationTrigger.flushLastDecrementRunnables();
} else {
if (mStackActionButton != null) {
boolean showing = mStackActionButton.getVisibility() == View.VISIBLE;
if (showing)
mStackActionButton.setVisibility(View.INVISIBLE);
}
}
}
use of com.android.systemui.recents.misc.ReferenceCountedTrigger in project android_frameworks_base by ResurrectionRemix.
the class RecentsView method hideStackActionButton.
/**
* Hides the stack action button.
*/
private void hideStackActionButton(int duration, boolean translate) {
if (!RecentsDebugFlags.Static.EnableStackActionButton) {
return;
}
final ReferenceCountedTrigger postAnimationTrigger = new ReferenceCountedTrigger();
hideStackActionButton(duration, translate, postAnimationTrigger);
postAnimationTrigger.flushLastDecrementRunnables();
}
use of com.android.systemui.recents.misc.ReferenceCountedTrigger in project android_frameworks_base by AOSPA.
the class RecentsView method hideStackActionButton.
/**
* Hides the stack action button.
*/
private void hideStackActionButton(int duration, boolean translate) {
if (!RecentsDebugFlags.Static.EnableStackActionButton) {
return;
}
final ReferenceCountedTrigger postAnimationTrigger = new ReferenceCountedTrigger();
hideStackActionButton(duration, translate, postAnimationTrigger);
postAnimationTrigger.flushLastDecrementRunnables();
}
use of com.android.systemui.recents.misc.ReferenceCountedTrigger in project platform_frameworks_base by android.
the class RecentsView method showStackActionButton.
/**
* Shows the stack action button.
*/
private void showStackActionButton(final int duration, final boolean translate) {
if (!RecentsDebugFlags.Static.EnableStackActionButton) {
return;
}
final ReferenceCountedTrigger postAnimationTrigger = new ReferenceCountedTrigger();
if (mStackActionButton.getVisibility() == View.INVISIBLE) {
mStackActionButton.setVisibility(View.VISIBLE);
mStackActionButton.setAlpha(0f);
if (translate) {
mStackActionButton.setTranslationY(-mStackActionButton.getMeasuredHeight() * 0.25f);
} else {
mStackActionButton.setTranslationY(0f);
}
postAnimationTrigger.addLastDecrementRunnable(new Runnable() {
@Override
public void run() {
if (translate) {
mStackActionButton.animate().translationY(0f);
}
mStackActionButton.animate().alpha(1f).setDuration(duration).setInterpolator(Interpolators.FAST_OUT_SLOW_IN).start();
}
});
}
postAnimationTrigger.flushLastDecrementRunnables();
}
use of com.android.systemui.recents.misc.ReferenceCountedTrigger in project platform_frameworks_base by android.
the class RecentsView method hideStackActionButton.
/**
* Hides the stack action button.
*/
private void hideStackActionButton(int duration, boolean translate) {
if (!RecentsDebugFlags.Static.EnableStackActionButton) {
return;
}
final ReferenceCountedTrigger postAnimationTrigger = new ReferenceCountedTrigger();
hideStackActionButton(duration, translate, postAnimationTrigger);
postAnimationTrigger.flushLastDecrementRunnables();
}
Aggregations