enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
1.17k stars 139 forks source link

Blur effect not work on Android #563

Open BeepBeepBopBop opened 9 months ago

BeepBeepBopBop commented 9 months ago

Hello, I am trying to use the Blur effect from the library but I have not been able to used it with Android.I have not found a reported issue out there about it so I unsure whether it is supposed to be working or not but anyways here is a code snippet showing the issue:

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:MauiApp1"
             xmlns:uranium="http://schemas.enisn-projects.io/dotnet/maui/uraniumui"
             x:Class="MauiApp1.MainPage">

    <Grid BackgroundColor="Red">
        <Grid.Effects>
            <uranium:BlurEffect Mode="Dark">
            </uranium:BlurEffect>
        </Grid.Effects>
        <Label HorizontalOptions="Center" VerticalOptions="Center" Text="The quick brown fox jumps over the lazy dog"/>
    </Grid>

</ContentPage>

Without the blur the page shows Red, as it should, and with the blur the page turns to white but no effect is applied.

Thanks for any help with this.

sokolinivan commented 9 months ago

Yes, I too have run into the same frustrating problem 😔:

  <TabBar>
        <TabBar.Effects>
            <uranium:BlurEffect></uranium:BlurEffect> // <--- It had no effect
        </TabBar.Effects>
        <Tab Title="Page" Icon="icon.svg">
            <Tab.Effects>
                <uranium:BlurEffect></uranium:BlurEffect>
            </Tab.Effects>
            <ShellContent ContentTemplate="{DataTemplate views:Page}" />
        </Tab>
        <Tab Title="Page">
            <ShellContent ContentTemplate="{DataTemplate views:Page}" />
        </Tab>
        <Tab Title="Page" Icon="icon.svg">
            <ShellContent ContentTemplate="{DataTemplate views:Page}" />
        </Tab>
    </TabBar>
enisn commented 8 months ago

The effect doesn't handle Tabbar or elements that inherited from Page, But I'll try to implement for Android