the49ltd / The49.Maui.BottomSheet

.NET MAUI library used to display pages as Bottom Sheets
MIT License
324 stars 31 forks source link

HasHandle="True" HandleColor="Red" not working on Android #54

Closed Frizbi22 closed 1 year ago

Frizbi22 commented 1 year ago

<?xml version="1.0" encoding="utf-8" ?>

<the49:BottomSheet xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:the49="https://schemas.the49.com/dotnet/2023/maui" Padding="16,32" BackgroundColor="LightGrey" HasHandle="True" HandleColor="Red" x:Class="MauiApp2.Controls.BottomSheet">

EdwardMcFlurry commented 1 year ago

@Frizbi22 I've also noticed that strange behaviour on Android and wondering why or when will it be fixed.

eccforgit commented 1 year ago

I'm having the same problem. HasHandle=True does nothing. The first item in the menu is the first item there is 0 real estate above it for the handle to exist.

paulvarache commented 1 year ago

Can you please confirm you have updated the Android theme to extend Material 3 as mentioned in the README?

t-macintosh commented 6 months ago

I have used your bottom sheets control in a previous Android app using one of the earlier releases (1.0.1) and I've just added the latest version (8.0.3) to a new app. I have added the styles.xml file to extend the Material theme as recommended in the docs, but when the bottom sheet displays the handle doesn't appear.

image

xaml code:

<the49:BottomSheet xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                   xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                   xmlns:the49="https://schemas.the49.com/dotnet/2023/maui"
                   xmlns:viewmodels="clr-namespace:XXXXXXXXXXXXXXX.ViewModels.Ble"
                   x:DataType="viewmodels:XXXXXXXXXXXX"
                   xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                   x:Class="XXXXXXXXXXXX.Views.MenuBottomSheet"
                   Background="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray900}}"
                   HasHandle="True"
                   HandleColor="White"
                   CornerRadius="30">

Platforms\Android\Resources\values\styles.xml

<?xml version="1.0" encoding="utf-8" ?>
<resources>
    <style name="Maui.MainTheme" parent="Theme.Material3.DayNight"></style>
</resources>
takennnusernames commented 5 months ago

hi, im having the same issue, is there a fix for this already?