All Projects → wcoder → Xamarin.BlurView

wcoder / Xamarin.BlurView

Licence: Apache-2.0 license
Dynamic iOS-like blur of underlying Views for Android.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Xamarin.BlurView

Blurview
Dynamic iOS-like blur of underlying Views for Android
Stars: ✭ 2,701 (+10288.46%)
Mutual labels:  blur, blurview
bottomnavigationviewex-android-binding
Xamarin.Android Binding Library for Ittianyu BottomNavigationViewEx
Stars: ✭ 25 (-3.85%)
Mutual labels:  xamarin-android, xamarin-android-binding
AMapBind
高德地图Xamarin.Android绑定库
Stars: ✭ 19 (-26.92%)
Mutual labels:  xamarin-android, xamarin-android-binding
Android-AltBeacon-Library
Proximity beacon ranging and monitoring library for Xamarin.Android apps
Stars: ✭ 38 (+46.15%)
Mutual labels:  xamarin-android, xamarin-android-binding
MaterialChipView
Material Chip View can be used as tags for categories, contacts or creating text clouds. Port of
Stars: ✭ 13 (-50%)
Mutual labels:  xamarin-android, porting-to-xamarin
Blurberry
Transparent blur using UIVisualEffectView without subclassing
Stars: ✭ 46 (+76.92%)
Mutual labels:  blur, blurview
ShortcutBadger
Xamarin.Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers. Port of
Stars: ✭ 24 (-7.69%)
Mutual labels:  xamarin-android, porting-to-xamarin
Prototype.Forms.Controls
This sample app contains a random mixture of Xamarin/Xamarin.Forms controls, views, and functionality snippets that I've created.
Stars: ✭ 21 (-19.23%)
Mutual labels:  xamarin-android
SKOR.UI
UI Controls for Xamarin.Forms
Stars: ✭ 56 (+115.38%)
Mutual labels:  xamarin-android
Friendly Code Editor
Try this Friendly Code Editor. You'll love it. I made it with a lot of effort. It has some great features. I will update it adequately later. Very helpful for developers. Enjoy and share.
Stars: ✭ 20 (-23.08%)
Mutual labels:  blur
Xamarin.Components-Architecture
A humble attempt to make Xamarin follows the components architecture
Stars: ✭ 20 (-23.08%)
Mutual labels:  xamarin-android
ideabag2
Idea Bag 2 provides programmers of all proficiency levels ideas for pet projects to work on when they are looking to increase their proficiency in a particular programming language.
Stars: ✭ 51 (+96.15%)
Mutual labels:  xamarin-android
Wires
Light binding library for Xamarin
Stars: ✭ 34 (+30.77%)
Mutual labels:  xamarin-android
LaunchMapsPlugin
Launch External Maps Plugin for Xamarin and Windows
Stars: ✭ 49 (+88.46%)
Mutual labels:  xamarin-android
Custom-Grid-View
Custom Drag and Drop Grid for Home Assistant
Stars: ✭ 103 (+296.15%)
Mutual labels:  view
blurdialog
A dialog providing a blur effect as background, a title and an icon
Stars: ✭ 72 (+176.92%)
Mutual labels:  blur
Observable
A generic ObservableObject for every property!
Stars: ✭ 41 (+57.69%)
Mutual labels:  view
metal camera
iOS metal camera with GPU shaders.
Stars: ✭ 68 (+161.54%)
Mutual labels:  blur
SwiftyWave
Siri Waves View in Swift
Stars: ✭ 66 (+153.85%)
Mutual labels:  view
blurhash
Blurhash encoder/decoder algorithm implemenation in Nim.
Stars: ✭ 26 (+0%)
Mutual labels:  blur

Xamarin.BlurView

version NuGet Badge Build status

Port of Dimezis/BlurView for Xamarin.Android


Android BlurView Cover

Dynamic iOS-like blur of underlying Views for Android. Includes library and small example project.

BlurView can be used as a regular FrameLayout. It blurs its underlying content and draws it as a background for its children. BlurView redraws its blurred content when changes in view hierarchy are detected (draw() called). It honors its position and size changes, including view animation and property animation.

Demo App at Google Play

How to use

<eightbitlab.com.blurview.BlurView
  android:id="@+id/blurView"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  app:blurOverlayColor="@color/colorOverlay">

   <!--Any child View here, TabLayout for example-->

</eightbitlab.com.blurview.BlurView>
float radius = 20;

View decorView = Window.DecorView;
//Activity's root View. Can also be root View of your layout (preferably)
ViewGroup rootView = decorView.FindViewById<ViewGroup>(Android.Resource.Id.content);
//set background, if your root layout doesn't have one
Drawable windowBackground = decorView.Background;

blurView.SetupWith(rootView)
       .SetFrameClearDrawable(windowBackground)
       .SetBlurAlgorithm(new RenderScriptBlur(this))
       .SetBlurRadius(radius)
       .SetHasFixedTransformationMatrix(true);

Always try to choose the closest possible root layout to BlurView. This will greatly reduce the amount of work needed for creating View hierarchy snapshot.

You can use SetHasFixedTransformationMatrix in case if you are not animating your BlurView, this might slightly improve the performance as BlurView won't have to recalculate its transformation matrix on each frame.

Supporting API < 17

// TODO

Support Xamarin.Forms

This library does not provide support for Xamarin.Forms out of the box, but you can do it via custom controls or effects.

Also, highly recommended to use Sharpnado.MaterialFrame to make views blurring.

Nuget

> Install-Package Xamarin.BlurView

Xamarin.Forms

You may use this library for Xamarin.Forms application, for this you need to create custom control with custom renderer. Example of implementation you can see here: https://github.com/wcoder/Xamarin.BlurView/commit/50c71e4bcc58cc07deb108c18dd6a40ccd077832

Important

BlurView can be used only in a hardware-accelerated window. Otherwise, blur will not be drawn. It will fallback to a regular FrameLayout drawing process.

Performance

It takes 1-4ms on Nexus 5 and Nexus 4 to draw BlurView with the setup given in example project.

License

Copyright 2016 Dmitry Saviuk (Android library), 2017 Yauheni Pakala (Xamarin library)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].