GithubHelp home page GithubHelp logo

rubensousa / floatingtoolbar Goto Github PK

View Code? Open in Web Editor NEW
1.6K 38.0 177.0 2.03 MB

A toolbar that morphs from a FloatingActionButton

License: Apache License 2.0

Java 100.00%
toolbar floatingactionbutton transition floatingmenu fab

floatingtoolbar's Introduction

floatingtoolbar's People

Contributors

bryant1410 avatar lionscribe avatar radarhere avatar ravidsrk avatar rubensousa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

floatingtoolbar's Issues

Setting padding doesn't work right

If i set paddingBottom at 48dp for example, and set the height to 104dp (56dp + 48dp), it just squeezes everything to the top and then cuts it.

In this screenshot the actions should just appear as usual above the navbar.

screenshot_20170127-135907

Add support to anchored FAB

If the FAB is anchored to an AppBarLayout, it's position in the Y-axis can change due to scrolling.
Currently, the FAB returns to the last position from where it was clicked.

Issue with snackbar dismiss

FloatingToolbar.Behavior needs to account these use cases:

  1. FAB click while there's a snackbar being shown
  2. Snackbar dismissal

Using it in DrawerLayout causes wrong

I want to use FloatingToolBar in a DrawerLayout,
but it causes "Error inflating class com.github.rubensousa.floatingtoolbar.FloatingToolbar" in XML file.
How can i solve it?

Add text

How to add text view above the each menu in FloatingToolbar

can't use "findViewById" to get FloatingToolbar instance

When I use "findViewById" to get instance,the compiler give me an error "An instance of type 'android.view.View' can not be of type 'com.github.rubensousa.floatingtoolbar.FloatingToolbar' ".I replaced the library version of sample with 1.4.1 and got the same error. My English is not good, please forgive me.

Allow removing all morph listeners

I had an issue with the library when I needed to do this, because the old listener wasn't removed properly for some reason.

I added this in my work and since then, the morph listeners work just as I want them to.

The thing don't want to have a global morph listener and re-add it or remove it when needed.

Thanks in advance

Setting visibility flag to toolbar applies it to items too

I think items should not be affected by the real view visibility flag.

When I set something like this
android:visibility="gone"

The toolbar is gone but even the items are too. There should be a separate flag for items visibility or something

1.3.0 FloatingToolbar exception and MenuItem text suggestion

When inserting FloatingToolbar in a xml file, it throws the following:
java.lang.NoSuchFieldError: floatingtoolbar_start_elevation at com.github.rubensousa.floatingtoolbar.FloatingToolbar.<init>(FloatingToolbar.java:138) at com.github.rubensousa.floatingtoolbar.FloatingToolbar.<init>(FloatingToolbar.java:93)

Also, there's a suggestion: I was looking at FloatingToolbar.addMenuItems() and realized that only images are added. It would be useful if could check if there is an item.getTitle() and add it as a TextView.

Question: how to inflate menu in FloatingToolBar?

Hi,

First, thanks for your contribution. I tried 2 different libs for achieving the wanted FAB morph effect, but both were a bit buggy. I want to try your implementation.

Reading the example provided I don't quite get it how the menu items are populated in the toolbar?

Thank you in advance,

Regards, Greg.

A question about badge

Thanks for your great lib.And I have a question about how to add badge for menu Item.I have checked your code,MenuLayout only add menu icon.Will you support it next version?

Animate elevation

Elevation should be animated from 6dp to 8dp on reveal and from 8dp to 6dp on unreveal.

Many menuitems => "more" button?

Hi,

Is there a possibility to get handling of "ifRoom" menu item mode like in regular menus on ToolBar?
The app could be used on devices with different screen sizes and hence you cannot know easily how to layer the items in the menu.

My own View on the FloatingToolBar

Hi,

I wanted to place a Spinner on the Toolbar, but it is simply not shown. I do have menu as well.
`
<com.github.rubensousa.floatingtoolbar.FloatingToolbar
android:id="@+id/floatingToolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="bottom"
app:floatingMenu="@menu/menu_edit_mode"
app:floatingAutoHide="false"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android" >

    <Spinner
        android:id="@+id/add_spinner"
        android:layout_width="50dp"
        android:layout_height="match_parent" />

</com.github.rubensousa.floatingtoolbar.FloatingToolbar>

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|start"
    android:layout_margin="@dimen/fab_margin"
    app:fabSize="mini"
    android:src="@drawable/ic_mode_edit_white_24dp" />

`

mMenuLayout NullPointException

I didn't set app:floatingMenu in xml
Just in code:

FloatingToolbar.setMenu(menu)

Result: NullPointException(line: 278) mMenuLayout.removeAllViews()

onMorphEnd seems to be called twice

Hi, I'm setting up transparent view to click & dismiss the toolbar; it appears & disappears with the FloatingToolbar. I'm using a MorphListener, and it looks like onMorphEnd is being called twice when I open the FloatingToolbar. The other callbacks only fire once.

It isn't urgent and isn't causing any troubles for me, but I figured it should be reported.

FAB moving to incorrect location.

Initially, the FAB is in the correct location within the layout. One the FAB is pressed, the animation takes it to the opposite corner (Top left) where it continues to stay.

API Level: 23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.