Skip to content

BlurButtonView

XML レイアウトでの使用

xml
<com.qmdeve.blurview.widget.BlurButtonView
    android:id="@+id/button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="ボタンテスト"
    app:buttonCornerRadius="12dp"
    app:buttonIconPadding="8dp"
    app:buttonIconSize="24dp"
    app:buttonTextBold="true"
    aap:blurRadius="12dp"
    app:overlayColor="#80FFFFFF"
    android:icon="?android:attr/actionModeWebSearchDrawable"
    app:buttonIconTint="@color/black"/>

API リファレンス

メソッド説明
setTextテキストを設定
setButtonCornerRadiusボタンの角半径を設定
setTextSizeテキストサイズを設定
setTextColorテキスト色を設定
setTextBoldテキストを太字に設定
setIcon setIconResourceアイコンを設定
setIconSizeアイコンサイズを設定
setIconPaddingアイコンのパディングを設定
setIconTintアイコンの色調を設定

属性説明

属性名説明
app:buttonCornerRadiusdimensionボタンの角半径を設定
app:buttonIconPaddingdimensionアイコンのパディングを設定
app:buttonIconSizedimensionアイコンサイズを設定
app:buttonTextBoldbooleanテキストを太字に設定
app:blurRadiusdimensionブラー半径を設定
app:overlayColorcolorオーバーレイ色を設定
app:buttonIconTintcolorアイコンの色調を設定
android:icon-アイコンを設定
android:text-テキストを設定
android:textSize-テキストサイズを設定