项目作者: kobakei

项目描述 :
Android custom button with centered drawable
高级语言: Java
项目地址: git://github.com/kobakei/CenteredDrawableButton.git
创建时间: 2016-02-29T07:28:08Z
项目社区:https://github.com/kobakei/CenteredDrawableButton

开源协议:Apache License 2.0

下载


CenteredDrawableButton

Download
JitPack
Android Arsenal

Android custom button with centered drawable

Screenshot

Gradle

Add the following dependency to your app build.gradle.

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

x,y,z is Download

JitPack.io is also available.

Usage

  1. <io.github.kobakei.centereddrawablebutton.CenteredDrawableButton
  2. android:id="@+id/button"
  3. android:layout_width="match_parent"
  4. android:layout_height="48dp"
  5. android:background="@drawable/button_bg"
  6. app:drawableLeft="@drawable/foo"
  7. app:drawableRight="@drawable/foo"
  8. app:drawableTop="@drawable/foo"
  9. app:drawableBottom="@drawable/foo"
  10. app:drawablePadding="@dimen/drawable_padding"
  11. app:text="@string/foo"
  12. app:textColor="@color/white"
  13. app:textSize="@dimen/font_size"
  14. app:textStyle="bold|italic"></io.github.kobakei.centereddrawablebutton.CenteredDrawableButton>

License

  1. Copyright (c) 2016 Keisuke Kobayashi
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.