Git Product home page Git Product logo

fab-toolbar's Introduction

Floating Action Button Toolbar

Android Arsenal

Provides the Floating Action Button Toolbar as specified in the Material Design Guide in a simple library.

demo

Usage

<com.github.alexkolpa.fabtoolbar.FabToolbar
	android:id="@+id/fab_toolbar"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:layout_gravity="bottom"
	tb:tb_anim_duration="500"
	tb:tb_button_gravity="end"
	tb:tb_container_gravity="center"
	>

	<ImageView
		android:id="@+id/attach"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:src="@drawable/ic_attachment_white_48dp"
		android:layout_marginLeft="@dimen/icon_margin"
		android:layout_marginRight="@dimen/icon_margin"
		/>

	<!-- More buttons can be added here -->

</com.github.alexkolpa.fabtoolbar.FabToolbar>

To hide or show the Toolbar, simply call hide() and show().

FabToolbar fabToolbar = ((FabToolbar) findViewById(R.id.fab_toolbar));

findViewById(R.id.attach).setOnClickListener(new View.OnClickListener() {
	public void onClick(View v) {
		fabToolbar.hide();
	}
});

Adding dependencies

Gradle:

dependencies {
	compile 'com.github.alexkolpa:floating-action-button-toolbar:0.5.1'
}

Maven:

<dependency>
	<groupId>com.github.alexkolpa</groupId>
	<artifactId>floating-action-button-toolbar</artifactId>
	<version>0.5.1</version>
</dependency>

License

The MIT License (MIT)

Copyright (c) 2015 Alex Kolpa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

fab-toolbar's People

Contributors

alexkolpa avatar smac89 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

fab-toolbar's Issues

Readme.md usage example causes Unsupported Operation Exception

In usage example, this line of XML code causes the mentioned exception:

tb:tb_animation_duration="500"

when converted to the following due to attribute name mismatch
tb:tb_anim_duration="500"
causes the following exception
java.lang.UnsupportedOperationException: Can't convert to integer: type=0x4
at android.content.res.TypedArray.getInteger(TypedArray.java:367)
at com.github.alexkolpa.fabtoolbar.FabToolbar.loadAttributes(FabToolbar.java:67)

Added to build.gradle as follows:

dependencies {
...
compile 'com.github.alexkolpa:floating-action-button-toolbar:0.5.0'
...
}

In library:
attrs.xml appears to define tb_anim_duration as float.
in FabToolbar.java, TypedArray.getInteger() is called.

Suggested fix:
please change attrs.xml > tb_anim_duration to "integer"

Failed to find CircularReveal 1.0.5

Error:A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find com.github.ozodrukh:CircularReveal:1.0.5.
Searched in the following locations:
https://jcenter.bintray.com/com/github/ozodrukh/CircularReveal/1.0.5/CircularReveal-1.0.5.pom
https://jcenter.bintray.com/com/github/ozodrukh/CircularReveal/1.0.5/CircularReveal-1.0.5.jar
file:/Applications/sdk/extras/android/m2repository/com/github/ozodrukh/CircularReveal/1.0.5/CircularReveal-1.0.5.pom
file:/Applications/sdk/extras/android/m2repository/com/github/ozodrukh/CircularReveal/1.0.5/CircularReveal-1.0.5.jar
file:/Applications/sdk/extras/google/m2repository/com/github/ozodrukh/CircularReveal/1.0.5/CircularReveal-1.0.5.pom
file:/Applications/sdk/extras/google/m2repository/com/github/ozodrukh/CircularReveal/1.0.5/CircularReveal-1.0.5.jar
Required by:
Crumbs:app:unspecified > com.github.alexkolpa:floating-action-button-toolbar:0.5.1

Unable to sync with Gradle because of this error

Change Color of fab & the toolbar layout ?

@AlexKolpa
How do we change the color of the button as well as the layout ? I have tried tb:backgroundTint="@color/orange" but it's not working, its not helping !

<com.github.alexkolpa.fabtoolbar.FabToolbar
    android:id="@+id/fab_toolbar"
    android:layout_alignParentBottom="true"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    tb:tb_anim_duration="500"
    tb:tb_button_gravity="end"
    tb:backgroundTint="@color/orange"
    tb:tb_container_gravity="center"
    >

    <ImageView
        android:id="@+id/attach"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/plus_white"
        android:scaleType="centerInside"/>

    <!-- More buttons can be added here -->

</com.github.alexkolpa.fabtoolbar.FabToolbar>

App not compiling after using this library

I just started using your fantastic library, but I am unable to compiler my app after I started using your library.

The error I get is from DexManager because my app is already using the CircuarReveal library and after using your library there seems to be a conflict.

What should I do to resolve this?

Resizable unpacked area

Hello,
could it be possible to make the expanding area resizable? When i put there more complex layout i just dont respect its height.
In my case multile lines of icons.

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.