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
Related
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
Putting a ShareActioProvider in an action bar and setting an intent on it is an easy way to share content on Android.
I would like to add my own action (e.g. "Add Bookmark", "Save for Later" etc) in the drop down menu that appears on screen when you tap on the share menu item. Is this possible?
I thought about creating an intent filter to capture the share intent within the app but I don't know if this would be the correct approach.
The ShareActionProvider should deal exclusively with share actions. Android provides ways for adding other custom actions (buttons) on the ActionBar.
The example provided on the official docs shows how to add a 'search' button. Thus, you can add your bookmark/save buttons alongside the share action provider one.
Additional actions can be moved to a spill-over button if there's too many of them to fit in the action bar.
I'm new in android programming, I want to create the GUI of my app, when making that the action bar must be customized to looks like :
here i have "three" things:
the button shape in the non-clicking state.
the button shape in the clicking state.
the buttons separator shape.
while searching i found somethings like Android-actionbar and ActionBar-Sherlock and i'm also familiar with how to customize the action bar and how to add buttons imagess and change it upon clicking, NOW, i don't know if there's is possibility to achieve my work using any of these methods, OR IF NOT, what's the best way.
You should take a look at both these links.
PagerTabStrip
ViewPagerIndicator
I'm using greendroid as a library in order to implement an action bar. I have a problem about how to remove the home button and customize the location of buttons.For example, I want to place the Add button first.
http://www.freeimagehosting.net/8kgbp1
In the picture above, I plan to arrange the Compose button to be displayed first, but I have problems on how to do it. Anyone know how to arrange the order of greendroid's action bar?
According to this page: http://developer.android.com/guide/topics/ui/menus.html#context-menu, Contextual Action Mode is preferred when working on Honeycomb or higher. This is actually very useful when you can apply the same kind of action to several items at a time (eg: delete).
But some actions actually only make sense on one item at a time (eg: Edit).
If you have only one of these actions, well, you can simply use the single click for it. So: One click = edit and select multiple items = action mode with actions that apply to many items
An example of that is the Gmail app: one click = read the email and selecting many items, you can mark them as read, delete them, etc.
OK, but what if you have multiple actions that can only a apply to one item at a time? Imagine the following situation.
You have a list of profiles.You can do the following actions on the profiles:
delete
export (save in a file)
share
These actions could be applied to many items at a time, so you place them in the action mode. But other actions could be:
edit
apply
You can only edit or apply one profile at a time.
So, in that case, is it OK to continue using floating menus like this:
One single click or long-click opens a floating menu with available options on that particular item alone (edit, apply, delete, export, share).
Selecting multiple items activates the action mode with actions that apply to all the selected items (delete, export, share)
Or maybe is it better to keep using action mode only?
When one item is selected, all actions are available (edit, apply, delete, export, share)
When more than one item are selected, the actions edit and apply are disabled/removed from the action bar.
Both methods can work of course and it could be up to the developer to choose but what would be best practice or the best approach to be more user-friendly?
Thanks!!
In GMail, you can also star as well as read on clicking on one item. This is achieved by putting buttons into each row (a star).