All Projects → nikartm → Fitbutton

nikartm / Fitbutton

The button which can use with icon, text, divider, custom ripple effect, border, corner radius e.t.c.

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Fitbutton

Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+247.62%)
Mutual labels:  design, android-development, android-ui
Customfloatingactionbutton
This view is for replacement of standard Floating Action Button from Google Support Library. It is easy to use, customizable and you can also add text to button
Stars: ✭ 222 (+252.38%)
Mutual labels:  android-development, android-ui, button
Moviebookingui Android
This is a concept of fetching a user's cinema show details like venue, movie, date & showtime before allowing him to place a cinema F&B order.
Stars: ✭ 62 (-1.59%)
Mutual labels:  design, android-ui
Music Player Go
🎶🎼 Very slim music player 👨‍🎤 100% made in Italy 🍕🌳🌞🍝🌄
Stars: ✭ 654 (+938.1%)
Mutual labels:  android-development, android-ui
Aiflatswitch
Nicely animated flat design switch alternative to UISwitch
Stars: ✭ 904 (+1334.92%)
Mutual labels:  design, button
Materialfavoritebutton
Animated favorite/star/like button
Stars: ✭ 586 (+830.16%)
Mutual labels:  android-ui, button
Zoomrecylerlayout
🎢 Zoom Recycler Layout Manager For Android Kotlin
Stars: ✭ 618 (+880.95%)
Mutual labels:  android-development, android-ui
Slidetoact
A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄
Stars: ✭ 783 (+1142.86%)
Mutual labels:  android-development, android-ui
Cookiebar2
Android library for displaying text messages, notifications and alerts at the top or bottom of the screen. A great alternative for toast and snackbar alerts.
Stars: ✭ 499 (+692.06%)
Mutual labels:  android-development, android-ui
Fillingbutton
🔥Replace typical onLongClickListener with this library!
Stars: ✭ 31 (-50.79%)
Mutual labels:  android-ui, button
Dachshund Tab Layout
Extended Android Tab Layout with animated indicators that have continuous feedback.
Stars: ✭ 853 (+1253.97%)
Mutual labels:  android-development, android-ui
Androidkex
Extensions for Kotlin. Use the power of Kotlin to make your code smaller and beautiful.
Stars: ✭ 35 (-44.44%)
Mutual labels:  android-development, android-ui
Alerter
An Android Alerting Library
Stars: ✭ 5,213 (+8174.6%)
Mutual labels:  android-development, android-ui
Superbottomsheet
Android native BottomSheet on steroids 💪
Stars: ✭ 548 (+769.84%)
Mutual labels:  android-development, android-ui
Discretescrollview
A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.
Stars: ✭ 5,533 (+8682.54%)
Mutual labels:  android-development, android-ui
Android Arsenal.com
Source to android-arsenal.herokuapp.com
Stars: ✭ 541 (+758.73%)
Mutual labels:  android-development, android-ui
Motiontoast
🌈 A Beautiful Motion Toast Library for Kotlin Android
Stars: ✭ 767 (+1117.46%)
Mutual labels:  android-development, android-ui
System Alert Window Example
Example project showing use of SYSTEM_ALERT_WINDOW permission on Android 23+, with back button interception.
Stars: ✭ 39 (-38.1%)
Mutual labels:  android-development, android-ui
Musicindicator
Music indicator for Android. Easy to use. 🎧 ✨
Stars: ✭ 475 (+653.97%)
Mutual labels:  android-development, android-ui
Android Ecosystem Cheat Sheet
🤖Android Ecosystem Cheatsheet 2020
Stars: ✭ 488 (+674.6%)
Mutual labels:  android-development, android-ui

Download API Android Arsenal Donate using PayPal

FitButton

The button which includes features:

  • Icon,
  • Text,
  • Divider,
  • Corner radius,
  • Border of the button,
  • Custom ripple effect,
  • Custom elements sizes,
  • Custom colors of elements,
  • Different positions of elements on the button

Installation

Gradle

implementation "com.github.nikartm:fit-button:$fb_version"

Screenshots

FitButton Screenshots

FitButton Screenshots FitButton Screenshots FitButton Screenshots

How to use?

Adjust the XML view:

More examples

<com.github.nikartm.button.FitButton
    android:id="@+id/fbtn"
    android:layout_width="match_parent"
    android:layout_height="58dp"
    android:layout_margin="32dp"
    android:enabled="true"
    android:gravity="center_vertical"
    app:fb_cornerRadius="2dp"
    app:fb_shape="rectangle"
    app:fb_divColor="#fff"
    app:fb_divWidth="1dp"
    app:fb_divHeight="40dp"
    app:fb_rippleColor="#FBE9E7"
    app:fb_iconWidth="28dp"
    app:fb_iconHeight="28dp"
    app:fb_iconPosition="left"
    app:fb_iconMarginStart="20dp"
    app:fb_iconMarginEnd="16dp"
    app:fb_icon="@drawable/ic_thumb_up"
    app:fb_iconColor="#FFF"
    app:fb_textPaddingStart="16dp"
    app:fb_textColor="#FFF"
    app:fb_text="Like Me"
    app:fb_backgroundColor="#FF7043"/>

Or programmatically:

private fun setupButton() {
    fitButton = findViewById(R.id.fbtn)
    fitButton!!
            .setTextFont(R.font.share_tech_regular)
            .setWidth(250)
            .setHeight(70)
            .setTextSize(20f)
            .setIconMarginStart(16f)
            .setIconMarginEnd(12f)
            .setTextColor(Color.parseColor("#F5F5F5"))
            .setIconColor(Color.parseColor("#FFFFFF"))
            .setDividerColor(Color.parseColor("#BCAAA4"))
            .setBorderColor(Color.parseColor("#FFF59D"))
            .setButtonColor(Color.parseColor("#FF7043"))
            .setBorderWidth(2f)
            .setRippleEnable(true)
            .setRippleColor(resources.getColor(R.color.colorAccent))
            .setOnClickListener {
                Toast.makeText(this,
                        "Click on ${fitButton?.getText()}",
                        Toast.LENGTH_SHORT).show()
            }
}

Kotlin support

If you got an error

Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;

You may need to add Kotlin support to your project.

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

and add to the root build.gradle

buildscript {
    ext.kotlin_version = 'X.Y.Z'
    
    ...
}

License

Copyright 2019 Ivan Vodyasov

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].