{"id":53684,"date":"2018-04-10T11:00:21","date_gmt":"2018-04-10T08:00:21","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=53684"},"modified":"2019-04-24T11:25:19","modified_gmt":"2019-04-24T08:25:19","slug":"android-floatingactionbutton-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/","title":{"rendered":"Android FloatingActionButton Example"},"content":{"rendered":"<h2>1. Introduction<\/h2>\n<p>The Floating Action Button is a special type of button primarily&nbsp;used for functionalities such as&nbsp;morphing, launching, and the transferring anchor point. Further, this type of button is often found on the floating&nbsp;surface of a user interface. The primary difference between the Floating Action Button and the other types buttons is that the Floating Action Button, like the name, says it is found on the surface of the Form or the User interface of the Application.<\/p>\n<p>In this article, we will be going through the process of creating a Floating Action button which will display an action message&nbsp;when the button is clicked.\n<\/p>\n<h2>2. Technologies used<\/h2>\n<ul>\n<li>Android Studio 3<\/li>\n<li>Android 7.1.1 (Nougat):&nbsp; API 25<\/li>\n<li>Android Virtual Device: Nexus 5X.<\/li>\n<\/ul>\n<h2>3. Creating the Project<\/h2>\n<p>Below is the first screen when creating a new Android project in Android Studio.<\/p>\n<p>Follow the below instructions as our first step in creating our application:<\/p>\n<ol>\n<li>Go to the main menu of the Android Studio IDE and select \u201cNew Project\u201d<\/li>\n<li>Then give your project a name<\/li>\n<li>Then give it a package name<\/li>\n<li>Then click next<\/li>\n<\/ol>\n<p><figure id=\"attachment_56820\" aria-describedby=\"caption-attachment-56820\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.12.49.png\"><img decoding=\"async\" class=\"wp-image-56820 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.12.49.png\" alt=\"\" width=\"820\" height=\"612\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.12.49.png 820w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.12.49-300x224.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.12.49-768x573.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-56820\" class=\"wp-caption-text\">Step 1<\/figcaption><\/figure><\/p>\n<p>Below is the second screen when creating a new Android project in Android Studio.<\/p>\n<p>Follow the below instructions as our next step in creating our application:<\/p>\n<ol>\n<li>Select the \u201cPhone and Tablet\u201d you are targeting with your application: in our case, we will be using \u201cAndroid Nougat\u201d<\/li>\n<li>Then since we are only building for the cell phone devices we are going to ignore all the other devices.<\/li>\n<li>Lastly, click Next.<\/li>\n<\/ol>\n<p><figure id=\"attachment_56819\" aria-describedby=\"caption-attachment-56819\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.02.png\"><img decoding=\"async\" class=\"wp-image-56819 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.02.png\" alt=\"\" width=\"820\" height=\"611\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.02.png 820w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.02-300x224.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.02-768x572.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-56819\" class=\"wp-caption-text\">Step 2<\/figcaption><\/figure><\/p>\n<p>Below is the third screen when creating a new Android project in Android Studio.<\/p>\n<p>Follow the below instructions as our last step in creating our application:<\/p>\n<ol>\n<li>Select the Activity template you would like to use for the first Activity of the project: in our case, we are going to choose the \u201cEmpty Activity\u201d template.<\/li>\n<li>Then click Next<\/li>\n<\/ol>\n<p><figure id=\"attachment_56818\" aria-describedby=\"caption-attachment-56818\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.16.png\"><img decoding=\"async\" class=\"wp-image-56818 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.16.png\" alt=\"\" width=\"820\" height=\"612\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.16.png 820w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.16-300x224.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.16-768x573.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-56818\" class=\"wp-caption-text\">Step 3<\/figcaption><\/figure><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Below is the last screen when creating a new Android project in Android Studio.<\/p>\n<p>Follow the below instructions as our last step in creating our application:<\/p>\n<ol>\n<li>Choose a name for the Activity.<\/li>\n<li>Select the \u201cGenerate Layout File\u201d option. The corresponding layout file for our activity gets automatically generated.<\/li>\n<li>Select the \u201cBackwards Compatibility (AppCompact)\u201d option. Our activity becomes backward compatible each time there is an upgrade to the Android platform.<\/li>\n<li>Then click Finish.<\/li>\n<\/ol>\n<p><figure id=\"attachment_56817\" aria-describedby=\"caption-attachment-56817\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.29.png\"><img decoding=\"async\" class=\"wp-image-56817 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.29.png\" alt=\"\" width=\"820\" height=\"611\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.29.png 820w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.29-300x224.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.13.29-768x572.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-56817\" class=\"wp-caption-text\">Step 4<\/figcaption><\/figure><\/p>\n<h2><\/h2>\n<h2>4. Implementing the FloatingActionButton&nbsp;Activity<\/h2>\n<p>Below is the code snippet of our completed Activity which will contain our Floating Action button which will be responsible for&nbsp;displaying the <code>SnackBar<\/code> once the Floating Action button is clicked. It extends the class&nbsp;<code>AppCompatActivity<\/code>&nbsp;from the Android platform in order to be compatible with future and previous versions of the Android platform.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>MainActivity.java<\/em><\/span><\/p>\n<pre class=\"brush: java;\">package com.floating_action_button_example.javacodegeeks.com.androidfloatingactionbuttonexample;\n\nimport android.support.design.widget.FloatingActionButton;\nimport android.support.design.widget.Snackbar;\nimport android.support.v7.app.AppCompatActivity;\nimport android.os.Bundle;\nimport android.view.View;\n\npublic class MainActivity extends AppCompatActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        \n        FloatingActionButton floatingActionButton = findViewById(R.id.floatingButton);\n        floatingActionButton.setOnClickListener(new View.OnClickListener() {\n        @Override\n        public void onClick(View view) {\n           Snackbar.make(view, \"The done floating button was clicked.\", Snackbar.LENGTH_LONG)\n                  .setAction(\"Action\", null).show();\n        }\n      });\n    }\n}\n<\/pre>\n<p>In this Activity, all we are doing is loading our Floating Action button using the&nbsp;<code>FloatingActionButton<\/code> component. We then use the component id we&#8217; ve assigned to our Floating Action button in the layout configuration to load the Floating Action button and cast it to the actual <code>FloatingActionButton<\/code> object. Further, we then register a listener on the button which will display a <code>SnackBar<\/code> once the button is clicked.[ulp id=&#8217;Ja8Orb5oPKdShcXt&#8217;]<\/p>\n<h2>5. The FloatingActionButton Layout Configuration<\/h2>\n<p>Below is the main layout file in which we define the Floating Action button that we have used in our activity, to trigger our <code>SnackBar<\/code>.<\/p>\n<p><figure id=\"attachment_56821\" aria-describedby=\"caption-attachment-56821\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.28.png\"><img decoding=\"async\" class=\"wp-image-56821 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.28.png\" alt=\"\" width=\"820\" height=\"239\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.28.png 820w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.28-300x87.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.28-768x224.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-56821\" class=\"wp-caption-text\">Layout Configuration File<\/figcaption><\/figure><\/p>\n<p>The&nbsp;<code>android.support.design.widget.FloatingActionButton<\/code>&nbsp;Tag component is used in order to successfully create and configure our Floating Action button. The button will be used for displaying our <code>SnackBar<\/code> which will be displayed once the Floating Action button is clicked.<\/p>\n<h2>6. Manifest file<\/h2>\n<p>Below is the manifest file of our application. It contains our application configuration mainly of Activities that are in the application. In our example, we only have the <code>MainActivity<\/code>, so therefore we only have a configuration for one Activity. The tag&nbsp;<code>activity<\/code>&nbsp;is used to define our configuration, in which we specify that this Activity is the entry point to our application. Further, we also specify the name of the Activity.<\/p>\n<p><figure id=\"attachment_56827\" aria-describedby=\"caption-attachment-56827\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.07.png\"><img decoding=\"async\" class=\"wp-image-56827 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.07.png\" alt=\"\" width=\"820\" height=\"227\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.07.png 820w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.07-300x83.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.14.07-768x213.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-56827\" class=\"wp-caption-text\">Android Manifest File<\/figcaption><\/figure><\/p>\n<h2>7. The Final Running Application<\/h2>\n<p>Below is a screenshot of our Floating Action button demonstration.<\/p>\n<p>In order to see the <code>SnackBar<\/code>, we must click on the Floating Action Button.<\/p>\n<p><figure id=\"attachment_56828\" aria-describedby=\"caption-attachment-56828\" style=\"width: 340px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.34.02.png\"><img decoding=\"async\" class=\"wp-image-56828 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.34.02.png\" alt=\"\" width=\"340\" height=\"630\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.34.02.png 340w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Screen-Shot-2018-04-07-at-16.34.02-162x300.png 162w\" sizes=\"(max-width: 340px) 100vw, 340px\" \/><\/a><figcaption id=\"caption-attachment-56828\" class=\"wp-caption-text\">Final Running Application<\/figcaption><\/figure><\/p>\n<h2>8. Conclusion<\/h2>\n<p>In this example, we went through the process of creating an Activity which has a Floating Action Button. This button was hocked with an event listener which enable the button when clicked to display a <code>SnackBar<\/code>. In order to remain within the scope of our example, we only implemented a <code>SnackBar<\/code> with a long Duration.<\/p>\n<h2>9. Download the Source Code<\/h2>\n<p>That was Android Floating Action Button.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/AndroidFloatingActionButtonExample.zip\"><strong>AndroidFloatingActionButtonExample<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction The Floating Action Button is a special type of button primarily&nbsp;used for functionalities such as&nbsp;morphing, launching, and the transferring anchor point. Further, this type of button is often found on the floating&nbsp;surface of a user interface. The primary difference between the Floating Action Button and the other types buttons is that the Floating &hellip;<\/p>\n","protected":false},"author":139,"featured_media":1202,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[521],"tags":[],"class_list":["post-53684","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-widget"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android FloatingActionButton Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"1. Introduction The Floating Action Button is a special type of button primarily&nbsp;used for functionalities such as&nbsp;morphing, launching, and the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android FloatingActionButton Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"1. Introduction The Floating Action Button is a special type of button primarily&nbsp;used for functionalities such as&nbsp;morphing, launching, and the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-10T08:00:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-24T08:25:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Georges Sofo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Georges Sofo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/\"},\"author\":{\"name\":\"Georges Sofo\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/8a230efff71f2ecde6491d3e814b6b9e\"},\"headline\":\"Android FloatingActionButton Example\",\"datePublished\":\"2018-04-10T08:00:21+00:00\",\"dateModified\":\"2019-04-24T08:25:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/\"},\"wordCount\":819,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"articleSection\":[\"widget\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/\",\"name\":\"Android FloatingActionButton Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"datePublished\":\"2018-04-10T08:00:21+00:00\",\"dateModified\":\"2019-04-24T08:25:19+00:00\",\"description\":\"1. Introduction The Floating Action Button is a special type of button primarily&nbsp;used for functionalities such as&nbsp;morphing, launching, and the\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/android\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"core\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"widget\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/widget\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Android FloatingActionButton Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/8a230efff71f2ecde6491d3e814b6b9e\",\"name\":\"Georges Sofo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/11\/Georges-Sofo_avatar_1510659183-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/11\/Georges-Sofo_avatar_1510659183-96x96.jpg\",\"caption\":\"Georges Sofo\"},\"description\":\"Georges Albert Sofo is a bachelors degree holder in software development, more specifically using Java technologies and following the OOP paradigm approach to software development. he has being working as a full time Software Engineer for more than 4 years, at companies ranging from telecommunication, consultancy, financial institution and educational type companies. His current focus lies in anything Java (Spring Framework preferably) on the backend and Javascript on the Frontend.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/georges-sofo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android FloatingActionButton Example - Java Code Geeks","description":"1. Introduction The Floating Action Button is a special type of button primarily&nbsp;used for functionalities such as&nbsp;morphing, launching, and the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/","og_locale":"en_US","og_type":"article","og_title":"Android FloatingActionButton Example - Java Code Geeks","og_description":"1. Introduction The Floating Action Button is a special type of button primarily&nbsp;used for functionalities such as&nbsp;morphing, launching, and the","og_url":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2018-04-10T08:00:21+00:00","article_modified_time":"2019-04-24T08:25:19+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","type":"image\/jpeg"}],"author":"Georges Sofo","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Georges Sofo","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/"},"author":{"name":"Georges Sofo","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/8a230efff71f2ecde6491d3e814b6b9e"},"headline":"Android FloatingActionButton Example","datePublished":"2018-04-10T08:00:21+00:00","dateModified":"2019-04-24T08:25:19+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/"},"wordCount":819,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","articleSection":["widget"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/","url":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/","name":"Android FloatingActionButton Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","datePublished":"2018-04-10T08:00:21+00:00","dateModified":"2019-04-24T08:25:19+00:00","description":"1. Introduction The Floating Action Button is a special type of button primarily&nbsp;used for functionalities such as&nbsp;morphing, launching, and the","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/android-floatingactionbutton-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Android","item":"https:\/\/examples.javacodegeeks.com\/category\/android\/"},{"@type":"ListItem","position":3,"name":"core","item":"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/"},{"@type":"ListItem","position":4,"name":"widget","item":"https:\/\/examples.javacodegeeks.com\/category\/android\/core\/widget\/"},{"@type":"ListItem","position":5,"name":"Android FloatingActionButton Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/8a230efff71f2ecde6491d3e814b6b9e","name":"Georges Sofo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/11\/Georges-Sofo_avatar_1510659183-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/11\/Georges-Sofo_avatar_1510659183-96x96.jpg","caption":"Georges Sofo"},"description":"Georges Albert Sofo is a bachelors degree holder in software development, more specifically using Java technologies and following the OOP paradigm approach to software development. he has being working as a full time Software Engineer for more than 4 years, at companies ranging from telecommunication, consultancy, financial institution and educational type companies. His current focus lies in anything Java (Spring Framework preferably) on the backend and Javascript on the Frontend.","url":"https:\/\/examples.javacodegeeks.com\/author\/georges-sofo\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/53684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/139"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=53684"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/53684\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1202"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=53684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=53684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=53684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}