Code Monkey home page Code Monkey logo

fabtextview's Introduction

FabTextView

An fab that transform into textview..

Install

Step 1

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

Step 2

Add this to your app/build.gradle.

If you don't want to include the dependency (com.android.support:appcompat-v7, com.android.support:design) from this project, use this:

compile('com.github.worker8:FabTextView:1.0.2') {
    transitive = false
}

Otherwise, use this:

compile 'com.github.worker8:FabTextView:1.0.2'

Usage

In xml:

<beepbeep.fabtextview.FabTextView
        android:id="@+id/fab_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_marginBottom="20dp"
        android:layout_marginEnd="16dp"
        app:fab_backgroundColor="@color/colorPrimaryDark"
        app:fab_diameter="55dp"
        app:fab_iconSrc="@mipmap/ic_launcher"
        app:fab_text="Android Robot"
        app:fab_textSize="20sp" />

To control the open and closing:

  • fabTextView.toggle(): call shrink() if expanded, call expand() if shrunk
  • fabTextView.shrink(): shrink to FAB
  • fabTextView.expand(): expand from FAB to the long button

fabtextview's People

Contributors

worker8 avatar

Watchers

 avatar  avatar  avatar

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.