-
Notifications
You must be signed in to change notification settings - Fork 178
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
CarouselView doesn't render with AbsoluteLayout on Android #38
Comments
So it appeared to be some inconsistency between Xamarin.iOS and Xamarin.Android, because the following XAML code works: <AbsoluteLayout BackgroundColor="Yellow"
HorizontalOptions="Fill"
VerticalOptions="Fill">
<StackLayout AbsoluteLayout.LayoutBounds="0,0,1,1"
AbsoluteLayout.LayoutFlags="All"
BackgroundColor="Blue"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<controls:CarouselViewControl x:Name="IntroCarousel"
HorizontalOptions="FillAndExpand"
ItemTemplate="{StaticResource myTemplateSelector}"
ItemsSource="{Binding Pages}"
Position="0"
VerticalOptions="FillAndExpand" />
</StackLayout>
<StackLayout AbsoluteLayout.LayoutBounds="1,1,0.9,1"
AbsoluteLayout.LayoutFlags="All"
BackgroundColor="Red"
Orientation="Horizontal"
VerticalOptions="End">
<Button x:Name="prevBtn"
IsVisible="false"
Style="{StaticResource IntroPreviousBtnStyle}"
Text="Previous" />
<Button x:Name="nextBtn"
Style="{StaticResource IntroNextBtnStyle}"
Text="Next" />
</StackLayout> Thanks for the great control. |
Did you solved this? |
@alexrainman commented on 2 dec. 2016 18:26 CET:
Yeah, see code above. The trick was to use the |
Yes, Forms has some problems in Android. |
I'm not sure which one was correct (iOS or Android), but still weird that they behave differently. 😞 |
If my work is helping you, please help me back: https://xamarinhq.wufoo.com/forms/nominate-a-xamarin-mvp/ |
This is what i have done that is community visible:
|
We have successfully implemented the CarouselView in our application. When trying to put a few buttons for navigation on top of the CarouselView (background red), it got weird. We use
AbsoluteLayout
, because at one point we'll use a transparent background so the buttons will hover over the carousel content. However it won't render on Android, while it does work on iOS (see screenshot below).The XAML looks like:
Current situation
Screenshot of our app on iOS (working):
Screenshot of our app on Android (not working):
Expected situation
So we expected to see no yellow background and the first item of the CarouselView to be visible (purple).
Is this a bug with CarouselView?
XF 2.3.3.168
CarouselView 2.5.1
The text was updated successfully, but these errors were encountered: