Skip to content
New issue

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

Handle not being shown. #116

Open
danleash opened this issue May 26, 2024 · 3 comments
Open

Handle not being shown. #116

danleash opened this issue May 26, 2024 · 3 comments

Comments

@danleash
Copy link

Hello, I'm trying to integrate bottom sheet into my application. I am setting the values HasHandle to true however, it is not being shown.
Tried:

var page = new BottomSheetElement();
page.HasHandle = true;
page.HandleColor = Colors.Salmon;

        And also:
        <the49:BottomSheet xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               x:Class="Siege.Client.Mobile.BottomSheetElement"
               xmlns:the49="https://schemas.the49.com/dotnet/2023/maui"
               xmlns:mobile="clr-namespace:Siege.Client.Mobile"
               Padding="16, 32" BackgroundColor="#0F0F0F" HandleColor="Azure" HasHandle="True" Shadow="">
<the49:BottomSheet.Detents>
    <the49:MediumDetent></the49:MediumDetent>
</the49:BottomSheet.Detents>
<VerticalStackLayout>
    <Label
        Text="Test Bottomsheet" VerticalOptions="Center" HorizontalOptions="Center" TextColor="Azure"/>
    <!-- <BoxView Style="{StaticResource Divider}" x:Name="divider" /> -->
</VerticalStackLayout>

</the49:BottomSheet>

Any ideas what would cause HasHandle not to work?

@FroggieFrog
Copy link

Check this section of the ReadMe and this video.

@kaykaykim
Copy link

Create a file Platform/Android/Resources/values/styles.xml file in the github readme file. the handler will show up

@MarcAlx
Copy link

MarcAlx commented Jul 26, 2024

Create a file Platform/Android/Resources/values/styles.xml file in the github readme file. the handler will show up

What you have to do is to follow this section of the README.md

On Android, make sure your application's theme extends the Material3 theme. This mean you need a Platforms/Android/Resources/values/styles.xml file with the following content:

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

If you already have this file, just make sure the Maui.MainTheme style inherits the Theme.Material3.DayNight parent.

With this the handle finally shows in my Android app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants