Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dimorinny/floating-text-button

Simple floating button with action text
https://github.com/dimorinny/floating-text-button

android ui

Last synced: about 1 month ago
JSON representation

Simple floating button with action text

Awesome Lists containing this project

README

        

# Floating Text Button

[![API](https://img.shields.io/badge/API-14%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![](https://jitpack.io/v/dimorinny/floating-text-button.svg)](https://jitpack.io/#dimorinny/floating-text-button)



## Dependency

Firstly, add [Jitpack](https://jitpack.io/#dimorinny/floating-text-button/) repository in your root build.gradle file (not your module build.gradle file):

```
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```

Add dependency to your module's build.gradle file:

```
dependencies {
compile 'com.github.dimorinny:floating-text-button:0.0.4'
}
```

## Usage

Add floating text button to your layout file like this:

```xml

```

Also you can use `app:floating_right_icon` for adding icon to right side.

For more complication usage - see [example](https://github.com/dimorinny/floating-text-button/tree/master/app/src/main).

## Demo

![Demo](https://github.com/dimorinny/floating-text-button/blob/master/art/sample.gif?raw=true)

## Use with snackbar

If you want to use FloatingTextButton with snackbar, you should add `layout_behavior` attribute to your layout like this:

```

```

![Demo](https://github.com/dimorinny/floating-text-button/blob/master/art/sample_behavior.gif?raw=true)