naxam / bottomtabbedpage-xamarin-forms Goto Github PK
View Code? Open in Web Editor NEWA page control for Xamarin.Forms to place tabs at the bottom.
License: Apache License 2.0
A page control for Xamarin.Forms to place tabs at the bottom.
License: Apache License 2.0
On tab change LastSelectedIndex should be update to the previous tab but it only updates for the first time only and not the subsequent calls.
We need gain support ofr this event
I wanna use Icon only
But, when i remove title, blank space is appear at title location
How I set icon only?
The first time opening app => exception : android.widget.FrameLayout cannot be cast to android.widget.ImageView
Bellow my home page xaml :
<naxam:BottomTabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:naxam="clr-namespace:Naxam.Controls.Forms;assembly=Naxam.Controls.Forms"
xmlns:local="clr-namespace:photocloak.View;assembly=photocloak"
x:Class="photocloak.View.Home">
<local:Search />
<local:ListCloak/>
</naxam:BottomTabbedPage>
I get this error when I try to install your package in a newly created Xamarin.Forms project.
Could not install package 'Naxam.BottomTabbedPage 0.2.0.2'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
What can I do to install your package?
is there a way to change the font size of the title when tab is selected?
Hello,
I would like to know if there is a way to use the "default" font type for the Title of the tabs?
For me, the "default" font type is the one that we can found in the Android Bottom Navigation View, like described in this blog.
Regards,
I got a switch page problem.
When switch page, it always pop to root, so I downloaded demo for test.
And I found out demo has same problem and it crash.
Call Stack
0x65 in Naxam.Controls.Platform.Droid.Utils.BottomTabbedRendererUtils.SwitchPage at C:\Users\total\Downloads\bottomtabbedpage-xamarin-forms\BottomTabbedPage.Droid\Utils\SizeUtils.cs:81,13 C# 0x3 in Naxam.Controls.Platform.Droid.BottomTabbedRenderer.OnNavigationItemSelected at C:\Users\total\Downloads\bottomtabbedpage-xamarin-forms\BottomTabbedPage.Droid\BottomTabbedRenderer.Tabs.cs:31,13 C# [External Code] 0x84 in Naxam.Controls.Platform.Droid.Utils.BottomTabbedRendererUtils.EnsureTabIndex at C:\Users\total\Downloads\bottomtabbedpage-xamarin-forms\BottomTabbedPage.Droid\Utils\SizeUtils.cs:50,17 C# 0x61 in Naxam.Controls.Platform.Droid.Utils.BottomTabbedRendererUtils.ChangePage at C:\Users\total\Downloads\bottomtabbedpage-xamarin-forms\BottomTabbedPage.Droid\Utils\SizeUtils.cs:317,13 C# 0x9 in Naxam.Controls.Platform.Droid.BottomTabbedRenderer.SwitchContent at C:\Users\total\Downloads\bottomtabbedpage-xamarin-forms\BottomTabbedPage.Droid\BottomTabbedRenderer.cs:166,13 C# 0x2B in Naxam.Controls.Platform.Droid.BottomTabbedRenderer.OnElementPropertyChanged at C:\Users\total\Downloads\bottomtabbedpage-xamarin-forms\BottomTabbedPage.Droid\BottomTabbedRenderer.cs:89,17 C# 0xB1 in Naxam.Controls.Platform.Droid.Utils.BottomTabbedRendererUtils.SwitchPage at C:\Users\total\Downloads\bottomtabbedpage-xamarin-forms\BottomTabbedPage.Droid\Utils\SizeUtils.cs:87,17 C# 0x3 in Naxam.Controls.Platform.Droid.BottomTabbedRenderer.OnNavigationItemSelected at C:\Users\total\Downloads\bottomtabbedpage-xamarin-forms\BottomTabbedPage.Droid\BottomTabbedRenderer.Tabs.cs:31,13 C#
Main cause is when switch page
public static void SwitchPage(this BottomTabbedRenderer renderer, IMenuItem item)
would be called twice.
anybody tried for uwp and ios? i dont see any information that it support these 2
ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DhruvTL.Pages.TourLandingPage"
NavigationPage.HasNavigationBar="false">
There is no animation when changing the tabs, (Left or Right) slide is a must in my opinion.
hi guys!
I am getting the stacktrace below when trying to navigate between tabs.
MonoDroid] UNHANDLED EXCEPTION: [MonoDroid] System.InvalidOperationException: PopToRootAsync is not supported globally on Android, please use a NavigationPage. [MonoDroid] at Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.INavigation.PopToRootAsync (System.Boolean animated) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:126 [MonoDroid] at Xamarin.Forms.Internals.NavigationProxy.OnPopToRootAsync (System.Boolean animated) [0x00043] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:181 [MonoDroid] at Xamarin.Forms.Internals.NavigationProxy.PopToRootAsync (System.Boolean animated) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:99 [MonoDroid] at Xamarin.Forms.Internals.NavigationProxy.OnPopToRootAsync (System.Boolean animated) [0x00043] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:181 [MonoDroid] at Xamarin.Forms.Internals.NavigationProxy.PopToRootAsync (System.Boolean animated) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:99 [MonoDroid] at Xamarin.Forms.Internals.NavigationProxy.OnPopToRootAsync (System.Boolean animated) [0x00043] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:181 [MonoDroid] at Xamarin.Forms.Internals.NavigationProxy.PopToRootAsync () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:94 [MonoDroid] at Naxam.Controls.Platform.Droid.Utils.BottomTabbedRendererUtils.SwitchPage (Naxam.Controls.Platform.Droid.BottomTabbedRenderer renderer, Android.Views.IMenuItem item) [0x00085] in <e760b94005374f89bb613a36b42ef3f8>:0 [MonoDroid] at Naxam.Controls.Platform.Droid.BottomTabbedRenderer.OnNavigationItemSelected (Android.Views.IMenuItem item) [0x00000] in <e760b94005374f89bb613a36b42ef3f8>:0 [MonoDroid] at Android.Support.Design.Widget.BottomNavigationView+IOnNavigationItemSelectedListenerInvoker.n_OnNavigationItemSelected_Landroid_view_MenuItem_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_item) [0x0000f] in <7aea3801170b4074a61ce58defd33d09>:0 [MonoDroid] at (wrapper dynamic-method) System.Object.4cbec557-4c41-4a9e-a9c6-c4e767ef5c03(intptr,intptr,intptr) [art] JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
Hello. I implemented your code and it works when the page is a BottomTabbedPage.
I want to use it inside a MasterDetailPage, so I have side menu and bottom menu, which is what i'm doing BottomNavigationBarXF (that package is outdated).
When I try to set BottomTabbedPage as MasterDetailPage.Detail I get this error:
Error: Failed to resolve assembly: 'Naxam.Controls.Forms, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
Here is my code:
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Panorama"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
ios:Page.UseSafeArea="true"
xmlns:naxam="clr-namespace:Naxam.Controls.Forms;assembly=Naxam.Controls.Forms"
x:Class="Panorama.Menus.Monitoring">
<MasterDetailPage.ToolbarItems>
<ToolbarItem Icon="puzzle.png"></ToolbarItem>
</MasterDetailPage.ToolbarItems>
<!--#region Master -->
<MasterDetailPage.Master>
<local:MasterPage/>
</MasterDetailPage.Master>
<!--#endregion-->
<!--#region Detail -->
<MasterDetailPage.Detail>
<!--#region Bottom menu-->
<!--Bottom bar menu-->
<naxam:BottomTabbedPage></naxam:BottomTabbedPage>
<!--#endregion-->
</MasterDetailPage.Detail>
<!--#endregion-->
</MasterDetailPage>
https://github.com/olivierlacan/keep-a-changelog
I've noticed this package has been updated but cannot find any changelogs about what has been updated. Have new features been added? have bugs been fixed?
It would be nice if you could add some kind of a change log so we are up to date :)
I have a project and I use bottomtabbedpage-xamarin-forms plug-in in my project.
I use Xamarin.Forms Version 2.5.0.280555.
It is fine.
But if I update grade Xamarin.Forms to higher version, I got an problem.
The problem is if I switch tab page then switch back to previous tab page.
The previous tab page would reload.
For example, I switch to page3 from page1, and then switch back to page1.
Page1 would reload.
I tried 3.0.0.561731 got the same result.
My test project
I don't if this caused by bottomtabbedpage-xamarin-forms or by Xamarin.Forms.
Thanks.
since Xamarin.Android.Support.Design 25.4.0.1 doesn't provide the BottomNavigationMenu
you have to downgrade your Xamarin.Android.Support.Design to 25.3
Suddenly Getting this error on build:
Can not resolve reference: Xamarin.Android.Support.ViewPager
, referenced by Naxam.Ittianyu.BottomNavExtension
. Please add a NuGet package or assembly reference for Xamarin.Android.Support.ViewPager
, or remove the reference to Naxam.Ittianyu.BottomNavExtension
visual studio 2019
Naxam.BottomTabbedPage 0.3.0.2
Xamarin.Android.Support.ViewPager 28.0.0.1 is also installed
when one of children of BottomTabbedPage is xamarin TabbedPage whith two tabs for example, every time I switch tabs made by BottomTabbedPage and returning to child tab with xamarin TabbedPage - sliding indicator animation when trying to switch tabs in TabbedPage by clicking on tab name not working first time, and then go to normal behavior unless I again switch tabs made by BottomTabbedPage.
https://www.youtube.com/watch?v=p-lBmZZfxD0
Hi, I've got a crash.
BottomTabbedPage 2.0.3
Xamarin.Forms 3.1.0
BottomTabbedRendererUtils.ChangePage (Naxam.Controls.Platform.Droid.BottomTabbedRenderer renderer, Android.Widget.FrameLayout pageContainer, Xamarin.Forms.Page page)
Java.Lang.RuntimeException: Attempt to invoke virtual method 'void android.support.v7.widget.GapWorker.remove(android.support.v7.widget.RecyclerView)' on a null object reference
ExceptionDispatchInfo.Throw ()
JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args)
JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters)
ViewGroup.RemoveViewAt (System.Int32 index)
BottomTabbedRendererUtils.ChangePage (Naxam.Controls.Platform.Droid.BottomTabbedRenderer renderer, Android.Widget.FrameLayout pageContainer, Xamarin.Forms.Page page)
BottomTabbedRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e)
(wrapper delegate-invoke) .invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
BindableObject.OnPropertyChanged (System.String propertyName)
Element.OnPropertyChanged (System.String propertyName)
MultiPage`1[T].OnPropertyChanged (System.String propertyName)
MultiPage`1[T].set_CurrentPage (T value)
BottomTabbedRendererUtils.SwitchPage (Naxam.Controls.Platform.Droid.BottomTabbedRenderer renderer, Android.Views.IMenuItem item)
BottomTabbedRenderer.OnNavigationItemSelected (Android.Views.IMenuItem item)
BottomNavigationView+IOnNavigationItemSelectedListenerInvoker.n_OnNavigationItemSelected_Landroid_view_MenuItem_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_item)
How can I fix it?
TabbedPage has performance issue because That load entire tab view when init
And in android, several ways solve this problem like using 'setUserVisibleHint'
And Can update this performance issue in this project??
Hello,
Sorry to bothering you:
I think there is an issue on the SizeUtils.cs
My Setup
void SetupBottomTabs()
{
BottomTabbedRenderer.FontSize = 10;
BottomTabbedRenderer.IconSize = 20;
BottomTabbedRenderer.ItemSpacing = 0;
BottomTabbedRenderer.BottomBarHeight = 56;
BottomTabbedRenderer.ItemAlign = ItemAlignFlags.Center;
BottomTabbedRenderer.MenuItemIconSetter = (menuItem, iconSource, selected) =>
{
var iconized = Iconize.FindIconForKey(iconSource.File);
if (iconized == null)
{
BottomTabbedRenderer.DefaultMenuItemIconSetter.Invoke(menuItem, iconSource, selected);
return;
}
var drawable = new IconDrawable(this, iconized).Color(Color.White).SizeDp(20);
menuItem.SetIcon(drawable);
};
}
Or have you got an idea on what I'm doing wrong?
Regards,
In your blog post you show different styles, such as one with no text:
How do I use this style? I do not see options for this in BottomTabbedRenderer
.
Thanks.
where BasePage
public class BasePage : ContentPage
{
Is it possible to set badges with this solution? I found it is exposed in bottomnavigationviewex but I'm not seing how to access the instance.
Is there a way I pull it out similar to
FindViewById<BottomNavigationViewEx>(Resource.Id.bnve);
Hi this issue i to track the support for .NET Standard and avoid the warning when include the package in to .NET Standard xamarin forms project.
warning NU1701: Package 'Naxam.BottomTabbedPage 0.1.0.1' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'.
Hello,
Is it possible to get an event when tab is clicked?
I need to do this: when i am on certain tab, and i click same tab again, i'd like the page to pop to root.
Looks like iOS supports this feature by default, and i need to do this on Android.
or is there any way to achieve this? Thank you.
Maybe...looks already have shadow
But wanna more customize
Ps. Your package is best for me thanks very much
Hi.
How can i show/hide the tab bar when keyboard appears?
Is it possible to move the Snackbar above Bottom Navigation bar.
I have created the snackbar like this
var view = ((Activity)Forms.Context).FindViewById(Android.Resource.Id.Content); var snack = Snackbar.Make(view, message, duration); if (actionText != null && action != null) snack.SetAction(actionText, action); snack.Show();
But the snackbar overlaps the bottom bar.
First,update Xamarin.Forms to 3.0.0.446417.
While I am setting App.Current.MainPage = new NavigationPage(...) in BottomTabbedPage leads the App to crash.
It's a funny thing, the method "Dispose(bool disposing)" in BottomTabbedRenderer would be called twice, so that cause the crash.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.