Java Code Examples for android.view.View.isHardwareAccelerated()

The following are Jave code examples for showing how to use isHardwareAccelerated() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Animations   File: AppearAnimationUtils.java   Source Code and License Vote up 6 votes
public static void startTranslationYAnimation(View view, long delay, long duration,
        float endTranslationY, Interpolator interpolator) {
    Animator translationAnim;
    if (view.isHardwareAccelerated() && isSupportRenderNodeAnimator()) {
        RenderNodeAnimator translationAnimRt = new RenderNodeAnimator(
                RenderNodeAnimator.TRANSLATION_Y, endTranslationY);
        translationAnimRt.setTarget(view);
        translationAnim = translationAnimRt;
    } else {
        translationAnim = ObjectAnimator.ofFloat(view, View.TRANSLATION_Y,
                view.getTranslationY(), endTranslationY);
    }
    translationAnim.setInterpolator(interpolator);
    translationAnim.setDuration(duration);
    translationAnim.setStartDelay(delay);
    translationAnim.start();
}
 
Example 2
Project: FlickLauncher   File: ShortcutAndWidgetContainer.java   Source Code and License Vote up 5 votes
@Override
protected void setChildrenDrawingCacheEnabled(boolean enabled) {
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
        final View view = getChildAt(i);
        view.setDrawingCacheEnabled(enabled);
        // Update the drawing caches
        if (!view.isHardwareAccelerated() && enabled) {
            view.buildDrawingCache(true);
        }
    }
}
 
Example 3
Project: SimpleUILauncher   File: ShortcutAndWidgetContainer.java   Source Code and License Vote up 5 votes
@Override
protected void setChildrenDrawingCacheEnabled(boolean enabled) {
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
        final View view = getChildAt(i);
        view.setDrawingCacheEnabled(enabled);
        // Update the drawing caches
        if (!view.isHardwareAccelerated() && enabled) {
            view.buildDrawingCache(true);
        }
    }
}
 
Example 4
Project: Musicoco   File: SeekBarCompatDontCrash.java   Source Code and License Vote up 4 votes
public static boolean isHardwareAccelerated(View view) {
    return view.isHardwareAccelerated();
}
 
Example 5
Project: screenfilter   File: SeekBar.java   Source Code and License Vote up 4 votes
public static boolean isHardwareAccelerated(View view) {
    return view.isHardwareAccelerated();
}
 
Example 6
Project: IdealMedia   File: SeekBarCompatDontCrash.java   Source Code and License Vote up 4 votes
public static boolean isHardwareAccelerated(View view) {
    return view.isHardwareAccelerated();
}
 
Example 7
Project: SliderPreferenceEmbedded   File: SeekBarCompatDontCrash.java   Source Code and License Vote up 4 votes
public static boolean isHardwareAccelerated(View view) {
    return view.isHardwareAccelerated();
}