Android : Difference FloatingActionButton and normal button - android

I have tried demo FloatingActionButton. I don't see real differences why I should change from normal button class to FloatingActionButton because if I want to make round button, I can try this tutorial:make circular button
As definition of Android Document:
Floating action buttons are used for a special type of promoted
action. They are distinguished by a circled icon floating above the UI
and have special motion behaviors related to morphing, launching, and
the transferring anchor point.
Floating action buttons come in two sizes: the default and the mini.
The size can be controlled with the fabSize attribute.
I think everything here I can implement easily in normal button such as size, circle, above UI. Just one thing I don't understand:
special motion behaviors related to morphing, launching, and the
transferring anchor point
I don't really know this. What does it mean about morphing lauching and transfering anchor point. Please explain for me.
thanks :)

There is a nice article about Floating Action Buttons at Google's Material Design Guidelines: https://www.google.com/design/spec/components/buttons-floating-action-button.html There is a lot of examples about how you can (and should and shouldn't) use the Floating Action Button at activity transitions and how it can be used to create nice, meaningful and logical animations.
If you use the correct Floating Action Button (the one from the Support Design library) together with CoordinatorLayout, it will also take care of Snackbars. When a Snackbar appears, the Floating Action Button will move up in order not to be covered by the Snackbar. You can check it out here: http://android-developers.blogspot.cz/2015/05/android-design-support-library.html

Related

Alternative to using multiple FloatingActionButtons?

Right now I am using three FloatingActionButtons to represent add, save, and reset operations. However according to Material Design guidelines, you shouldn't use more than one such button: https://material.google.com/components/buttons-floating-action-button.html
What is the accepted practice? Is there another sort of bar that is better for holding onto multiple functionality buttons?
I would suggest using a single action button that transforms into related actions, i.e., add, save and reset.
So you'll have something like this after the floating action button was pressed:
If you choose to do this you might want to check out this:
Morph floating action button into related actions
Another option could be transforming the floating action button into a toolbar like this:
In that case you will want to check this out:
Floating Action Button expansion

What are uses of Floating Action Button in Material Design Android

Floating Action Button in Material Design is more prevalent in major apps, what are the specific use cases where FAB is more better choice.
Floating action buttons are used for a special type of promoted action. They are distinguished by a circled icon floating above the UI and have special motion behaviors related to morphing, launching, and the transferring anchor point.
Floating action buttons come in two sizes: the default and the mini. The size can be controlled with the fabSize attribute.
for more detail visit this : https://developer.android.com/reference/android/support/design/widget/FloatingActionButton.html
"A floating action button represents the primary action in an application."
Example action - add new contact for contact list view.
https://www.google.com/design/spec/components/buttons-floating-action-button.html

Animating a Floating Action Button Activity Transition

The Material Design Guidelines suggest that you transition a floating action button into a new Activity, after you click on the button.
Example Video from Guidelines
I tried to animate this with Activity transition, as intoduced in API 21 (Lollipop) but I can't find a way to transform from the color of the button to the color of the toolbar. (I used this Floating Action Button)
Obviously, the example isn't an actual demo running on android, but the device that is displayed is clearly a smartphone. Therefore there has to be a way to code this kind of transition, or else Google would not have added this on their Guidelines, would they?
Can I use Activities to achieve this or do I have to use Fragments?
As FloatingActionButton descends from ImageButton and adds only a few new methods,you can use setBackgroundColor() of ImageButton to change its background.

UI screen design

I am working on an Android application and have to code up the following design for one of the screens:
(Ignore the yellow stuff, I have just masked the Logo and the App-specific information for now)
My question is: How do I design this particular type of screen? The top pane is akin to an ActionBar in Android. However, when any button on the top pane is hit, this custom "popup" having a rectangular form with a small arrow on top pointing towards the button is display and does not interrupt the current/main activity.
I have looked around, but still dont understand how to accomplish this.
Any thoughts? Thanks!
You can use the native Action Bar along with the icons.
The only problem is if you want to show them all at once.
Some icons may be hidden depending on the size of the phone.
As for the custom pop-up, the toast feature is available to do that.
It is quite easy to adjust the position of toasts and customise toasts :
Customisation of toasts: http://developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView
Changing postion of toasts: How to change position of Toast in Android?

Vertical Action Bar for Android

I want to display the Action Bar Vertically in my App.
I have found few examples for the Horizontal One, but not any for the Vertical One.
Can anyone please give me any example for the Vertical Action Bar.
Thanks,
David Brown
There's nothing in the Android UI design guide about a vertical ActionBar. But you might be able to coerce a similar effect by locking the display orientation, and then applying a rotation to the View in the content area. You also might be able to get somewhere by downloading the source code for ActionBarSherlock and implementing your own version of the ActionBar. But I don't recommend either of these solutions. If you're really that intent on putting actions on the side of your screen, I suggest either a small vertical LinearLayout, or implement one of the side navigation solutions as discussed in Android Facebook style slide.

Categories

Resources