Yaron Vazana

NLP, Algorithms, Machine Learning, Data Science, tutorials, tips and more

  • About
  • Blog
  • Projects
  • Medium

Contact Me

yaronv99 [at] gmail.com

Powered by Genesis

You are here: Home / Android / How To Add Android Floating Action Button

How To Add Android Floating Action Button

August 18, 2015 by Yaron 1 Comment

Floating action buttons are awesome. They are clean, intuitive, simple and most of all, they are always there when you need them. As Google’s material design keeps improving, the floating action buttons (FAB) are getting more and more popular, adding them to your android app is no longer a complicated task.

Floating Action Button

Add needed dependencies to build.gradle

Use The Floating Action Button Widget From the Support Library

After adding the google’s support library into your project, you can use all the new widgets without the need to develop from scratch.

This approach is by far the easiest way to add material design components to your app. The only part left to do is to add a click handler.

Add a Click Event to The Floating Action Button

Add the following code to the corresponding Activity java class where you have the button visible, in this example I open a new activity screen when clicking it.

Cheers

Filed Under: Android, Mobile Tagged With: Android, Apps, FAB, Mobile

I am a data science team lead at Darrow and NLP enthusiastic. My interests range from machine learning modeling to solving challenging data related problems. I believe sharing ideas is where we all become better in what we do. If you’d like to get in touch, feel free to say hello through any of the social platforms. More About Yaron…

SUBSCRIBE TO BLOG

Subscribe to Blog

Subscribe to get the latest posts to your inbox

Recent Posts

  • Training an AutoEncoder to Generate Text Embeddings
  • Using Dockers for your Data Science Dev Environment
  • Identifying Real Estate Opportunities using Machine Learning
  • How to Create a Simple WhatsApp Chatbot in Python using Doc2vec
  • Average Word Vectors – Generate Document / Paragraph / Sentence Embeddings
  • Visualizing Vectors using TensorBoard
  • Training a Doc2Vec Model with Gensim
 

Loading Comments...