CenteredDrawableButton

Additional

Language
Java
Version
1.0.5 (Dec 8, 2016)
Created
Feb 29, 2016
Updated
Dec 8, 2016 (Retired)
Owner
Keisuke Kobayashi (kobakei)
Contributor
Ravindra Kumar (ravidsrk)
1
Activity
Badge
Generate
Download
Source code
APK file

Promotion

CenteredDrawableButton

Android custom button with centered drawable

Gradle

Add the following dependency to your app build.gradle.

dependencies {
    compile 'io.github.kobakei:centereddrawablebutton:x.y.z'
}

x,y,z is

JitPack.io is also available.

Usage

<io.github.kobakei.centereddrawablebutton.CenteredDrawableButton
        android:id="@+id/button"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:background="@drawable/button_bg"
        app:drawableLeft="@drawable/foo"
        app:drawableRight="@drawable/foo"
        app:drawableTop="@drawable/foo"
        app:drawableBottom="@drawable/foo"
        app:drawablePadding="@dimen/drawable_padding"
        app:text="@string/foo"
        app:textColor="@color/white"
        app:textSize="@dimen/font_size"
        app:textStyle="bold|italic"/>

License

Copyright (c) 2016 Keisuke Kobayashi

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.