Android DrawerLayout blur background - android

I would like to blur the background of the content pane when the DrawerLayout is open. I noticed that there is the ability to change the dim color by setting setScrimColor but I would like to blur the background. Is there a way to achieve this?

The process involves the following stages:
Get a snapshot of the whole drawer layout.
Crop it to the exact size of your menu.
Downscale it quite a bit (a factor of 8 is pretty good).
Blur that image.
Have a custom view that displays part of an image right behind of
where your menu will appear.
As you slide the drawer show a larger part of that image.
Please refer this answer
Blur background of Navigation Drawer
Or you can use one of these libraries
EtsyBlur
BlurNavigationDrawer
BlurEffectForAndroidDesign

Check out this library: Blurry. it takes a View or a Bitmap, blurs it and casts it to a ViewGroup or an ImageView. So just run Blurry.with(context).capture(parentView).into(parentView); whenever the drawer is opened.
Where parentView is the container that holds everything.

Related

Activity Transitions fade-in

For my app, I plan to have a grid of images and when you select one the image increases in size and the rest of the images get grayed out. I read about Activity Transitions but have never implemented that before so I'm not sure if this is the appropriate way of achieving the correct affect. I was thinking of possibly using a fragment and an animation to display the image in a larger size but how do I display the activity in the background with a grey tint to it so that it looks out of focus? I'm looking here to see what you think the most appropriate method of making this work. Here is a gif of exactly what I'm trying to accomplish.

How to blur the background of new added view on frame layout?Android

I am searching for it from very long time. I want to blur the background of the new added view to the frame layout. The new added view is a linear layout which opens as a pop up. Now how can I blur that frame layout.
I have gone through all the posts regarding blurring the background but i did not find that useful for my problem Because they all suggest to create a bitmap and set it blur on the bitmap. I simply want to blur the complete view behind the pop up
Use this library to blur the background of popup https://github.com/faradaj/BlurBehind
On BlurredActivity show the popup and finish the activity when pop dismiss.
You can use Renderscript Intrinsics, which are a set of built-in functions that require very little code to use, but are optimized for high-performance.
Once you have the blurring, the rest of the process is fairly straight forward. When you plan to leave an activity, create a bitmap of the current view and write it to disk. When you start your new activity (which should have a transparent background), you override the transition (otherwise you’ll get the default zoom), and set the background to the blurred image you saved earlier. Add a fade in for the alpha and you get a nice little effect!
If you’d like to see how this looks in a sample project, you can find it on Github here.

How to scale the image in the Android CollapsingToolbarLayout like WunderList does

Like this two Screenshots below. First imgage is when the toolbar is not collapsed and the second image is the collapsed toolbar. I wonder how to animate & scale the image (T) and fading its title (Tester32)
saulmm has recently posted a really nice example of a similar layout (CoordinatorBehaviorExample).
You can easily modify it to fit your needs.

How to create a smooth transition with a view moving to overlay above an activity?

I'm investigating how the author of "inflickr"
https://play.google.com/store/apps/details?id=kr.infli
created the smooth transitions to bring his 'picture info' views above the picture itself. What method did the author use to create this effect?
Regarding Inflikr, there is only one activity involved.
The custom view (in black here) have a gesture detector and on a scroll up it will pull a details's view placed at the bottom (red frame).
The detail's view is transparent, when sliding up it increase alpha on a black shader on the custom view so the white text become readable even on a bright photo.
ps: rendered on device using scalpel
Thanks

What kind of animation would one use

I am attempting a rather complicated animation in android. I want to be able to have a background image and have a sliding drawer come in from the left, BUT I don't want the drawer to come on over top of the the background image. Instead, I would like to squeeze the background so that you can see the drawer on the screen and the entire background image (though squeezed) at the same time.
I have looked into several animation but I can't come up with a combination that will do this.
Ideas?
Scale the background image with an anchor at the right side. Then translate the drawer from left (invisible area) to the right(visible area)

Categories

Resources