标签:bsp image raw UI 效果 drawable height oal ...
allprojects { repositories { ... maven { url ‘https://jitpack.io‘ } } }dependencies { ... compile ‘com.github.Brioal:NumImageButtom:1.0‘ ...}| 方法 | xml属性 | 作用 |
|---|---|---|
setTextColor(int textColor) |
textColor |
设置字体的颜色 |
setNum(int num) |
numIndex |
设置消息数量 |
setDrawable(Drawable drawable) |
imageSrc |
设置显示图标 |
setNumBg(Drawable numBg) |
numBg |
设置文字的背景 |
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#BD014D"/> <corners android:radius="100dp"/></shape> <com.brioal.view.NumImageButton android:id="@+id/numImageButton1" android:layout_width="200dp" android:layout_height="200dp" app:imageSrc="@mipmap/ic_launcher" app:numBg="@drawable/round_bg_accent" app:numIndex="11"> </com.brioal.view.NumImageButton>mNumImageButton.setNum(10) .setTextColor(Color.WHITE) .setDrawable(getResources().getDrawable(R.drawable.ic_launcher)) .setNumBg(getResources().getDrawable(R.drawable.round_bg_accent));
标签:bsp image raw UI 效果 drawable height oal ...
原文地址:http://www.cnblogs.com/wz901881/p/6791937.html