Floating Action MENU - No 3rd Party Library - Quick Tutorial (Xamarin Android)
Вставка
- Опубліковано 13 вер 2024
- Floating action button aka FAB is a staple of apps using material design. What if you need the user to choose from multiple different actions? Well, you have to use a floating action menu which is basically a FAB which upon click displays multiple smaller FABs.
There are two ways in which we can add a floating action menu. Using a 3rd party library is one option, but that is not always ideal because libraries can get outdated. Much more viable option is to code it ourselves and use the latest and greatest things from the design support library made by Google which guarantees we will always be able to use bleeding edge features.
Get the code from this tutorial: wp.me/p8jOJP-5j
Go to my website for more information, code examples and articles:
● resocoder.com
Follow me on social media:
● / resocoder
● / resocoder
Rotating a + by 135° to get an × is clever!
great coding man!!! Is not possible to have it in ios too?
that was great, cross platform would be brilliant? :)
what about cross platform?is it work??
Hey, it doesnt show fabbaloon and fabcake for me. do you know what could be the problem ? its the same code
I finally got everything working except when I go to run this at the very end I get this error for my
private FloatingActionButton fabAirballoon;
private FloatingActionButton fabCake;
private FloatingActionButton fabMain;
System.NullReferenceException: Object reference not set to an instance of an object.
If anyone else gets this same error, make sure your MainActivity.cs has everything exactly like his in the video, for instance I didn't have "SetContentView(Resource.Layout.Main);" before and got that error.
how do the same in iOS ?
How can I display a label with a fab?
you are the best man, subscribed :D
How to make it always on top?
Its great tutorial men!
I tried to download the icons on the site you mentioned and they don't download like yours so I cant use them any idea why that is
Hello! Did you click on "Icon Package -> .XML Vector Drawable" when downloading?
Thanks for replying! I did click on icon package -> .XML Vector Drawable but it still doesn't look like yours and just downloads as a single xml document
@@ResoCoder will it wrk on ios?...pls reply
You are amazing!!!
best thanks
I also don't have a drawable folder
Hmm, it should be there already but I think you can also simply create it.