We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activity has one BlurView. I show some Views by using ObjectAnimator. Frames drop too many.
BlurView
Views
ObjectAnimator
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/colors"> <com.github.mmin18.widget.RealtimeBlurView android:id="@+id/blurView" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone" app:realtimeBlurRadius="10dp" app:realtimeOverlayColor="#BB000000" /> <Button android:id="@+id/source" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="30dp" android:background="@drawable/shape_circle" android:text="+" android:textSize="50sp" /> </RelativeLayout>
private void doExpandAnim() { blurView.setVisibility(View.VISIBLE); PropertyValuesHolder z1 = PropertyValuesHolder.ofFloat("alpha", 0, 1); ObjectAnimator z = ObjectAnimator.ofPropertyValuesHolder(blurView, z1); z.setInterpolator(new LinearInterpolator()); z.setDuration(350); PropertyValuesHolder c1 = PropertyValuesHolder.ofFloat("rotation", 0, 360 + 45); ObjectAnimator c = ObjectAnimator.ofPropertyValuesHolder(source, c1); c.setDuration(350); AnimatorSet animatorSet = new AnimatorSet(); animatorSet.playTogether(z, c); animatorSet.start(); } private void doCollapseAnim() { PropertyValuesHolder z1 = PropertyValuesHolder.ofFloat("alpha", 1, 0); ObjectAnimator z = ObjectAnimator.ofPropertyValuesHolder(blurView, z1); z.setInterpolator(new LinearInterpolator()); z.setDuration(350); z.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { blurView.setVisibility(View.GONE); } }); PropertyValuesHolder c1 = PropertyValuesHolder.ofFloat("rotation", 360 + 45, 0); ObjectAnimator c = ObjectAnimator.ofPropertyValuesHolder(source, c1); c.setDuration(350); AnimatorSet animatorSet = new AnimatorSet(); animatorSet.playTogether(z, c); animatorSet.start(); }
The text was updated successfully, but these errors were encountered:
But using PopupWindow / Dialog does not have this problem.
PopupWindow
Dialog
Sorry, something went wrong.
Can't reproduce. I'm testing on a galaxy s3 phone. Add some buttons under the blur view.
WOW!! THX A LOT!! You are right!!
I find that i closed the hardware accelerated for this.
hardware accelerated
I should NOT use at all:
android:hardwareAccelerated="false"
and
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEA getWindow().setFlags( WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); }
use these instead:
myView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
ozodrukh/CircularReveal#109 (comment)
No branches or pull requests
Activity has one
BlurView
. I show someViews
by usingObjectAnimator
. Frames drop too many.The text was updated successfully, but these errors were encountered: