- Home
- Forum
- Xamarin.Forms
- Admob ads are not working within SfNavigationDrawer on Android Tablets
Admob ads are not working within SfNavigationDrawer on Android Tablets
I Integrated admob using code here . there is a strange behavior of SfNavigationDrawer using with admob adview. if I have adview within the sfnavigationdrawer.contentview it wont displayed
<navigation:SfNavigationDrawer x:Name="navigationDrawer" IsOpen="{Binding IsFilterOpen, Mode=TwoWay}" Position="Right" Transition="SlideOnTop" DrawerWidth="150" DrawerHeight="300" DrawerHeaderHeight="50" DrawerFooterHeight="50">
<navigation:SfNavigationDrawer.DrawerHeaderView>
</navigation:SfNavigationDrawer.DrawerHeaderView>
<navigation:SfNavigationDrawer.DrawerFooterView>
</navigation:SfNavigationDrawer.DrawerFooterView>
<navigation:SfNavigationDrawer.DrawerContentView>
</navigation:SfNavigationDrawer.DrawerContentView>
<navigation:SfNavigationDrawer.ContentView>
<StackLayout x:Name="formView" CompressedLayout.IsHeadless="true">
<SearchBar x:Name="MyAutoComplete" TextChanged="MyAutoComplete_TextChanged" Placeholder="{resx:Translate Searchitems}" PlaceholderColor="Silver" Text="{Binding SearchText, Mode=OneWayToSource}"
SearchCommand="{Binding SearchClick}" />
<sfListView:SfListView x:Name="listitems" SwipeOffset="250" BackgroundColor="White" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"
ItemsSource="{Binding itemTemplates}" SelectionMode="Single"
ItemSpacing="1" IsStickyHeader="False" IsStickyFooter="False"
AllowSwiping="True" IsEnabled="True"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}" Swiping="listitems_Swiping"
SwipeEnded="listitems_SwipeEnded" >
<sfListView:SfListView.LayoutManager>
<sfListView:LinearLayout />
</sfListView:SfListView.LayoutManager>
<sfListView:SfListView.ItemSize>
<OnPlatform x:TypeArguments="x:Double">
<OnPlatform.Android>
<OnIdiom x:TypeArguments="x:Double" Phone="200" Tablet="250" />
</OnPlatform.Android>
<OnPlatform.iOS>
<OnIdiom x:TypeArguments="x:Double" Phone="200" Tablet="250" />
</OnPlatform.iOS>
<OnPlatform.WinPhone>
<OnIdiom x:TypeArguments="x:Double" Phone="200" Tablet="250" Desktop="300" />
</OnPlatform.WinPhone>
</OnPlatform>
</sfListView:SfListView.ItemSize>
<sfListView:SfListView.ItemTemplate>
<DataTemplate>
<shared:_itemTemplates />
</DataTemplate>
</sfListView:SfListView.ItemTemplate>
</sfListView:SfListView>
<controls:AdView HorizontalOptions="FillAndExpand" />
</StackLayout>
</navigation:SfNavigationDrawer.ContentView>
</navigation:SfNavigationDrawer>
but I just move same adview outside sfnavigationdrawer it just works fine. what s the deal with navigationdrawer? does it not allow view to extend and since it doesnt have enough space, it wont be displayed?
this works
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" CompressedLayout.IsHeadless="true">
<navigation:SfNavigationDrawer x:Name="navigationDrawer" IsOpen="{Binding IsFilterOpen, Mode=TwoWay}" >
</navigation:SfNavigationDrawer>
<controls:AdView HorizontalOptions="FillAndExpand" />
</StackLayout>
SIGN IN To post a reply.
2 Replies
EM
Emil
April 1, 2018 01:58 PM UTC
Above is only valid for Tablets 7 or 10 inch. On Android Phones it works. I tested with 7 and 10 inch tablets
RB
Rabhia Beham Kathar Mideenar
Syncfusion Team
April 2, 2018 12:49 PM UTC
Hi Emil,
Thanks for Contacting Syncfusion Support.
We have analysed your code snippet and have checked with the image getting added with the button click. We could not reproduce the issue from our side. Please have the sample from the below link.
Sample Link: http://www.syncfusion.com/downloads/support/forum/136776/ze/NavigationDrawer021910414024
Thanks for Contacting Syncfusion Support.
We have analysed your code snippet and have checked with the image getting added with the button click. We could not reproduce the issue from our side. Please have the sample from the below link.
Sample Link: http://www.syncfusion.com/downloads/support/forum/136776/ze/NavigationDrawer021910414024
Please check the sample if the issue persists from your side,modify the same with the issue reproducing steps which will be helpful for us to analyse further and provide an appropriate solution.
Please let us know if you have any concern.
Regards,
Rabhia Beham K.
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
EM Emil
- Apr 1, 2018 01:57 PM UTC
- Apr 2, 2018 12:49 PM UTC