Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dimorinny/floating-text-button
- Owner: dimorinny
- License: apache-2.0
- Created: 2017-01-28T22:20:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-05T03:07:15.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T01:15:18.697Z (4 months ago)
- Topics: android, ui
- Language: Java
- Size: 762 KB
- Stars: 149
- Watchers: 5
- Forks: 50
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-android-ui - floating-text-button - 带动作文本的简单浮动按钮 (按钮)
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)