Skip to content

BlurTitlebarView

XMLレイアウトで使う

xml
<com.qmdeve.blurview.widget.BlurTitlebarView
    android:id="@+id/blurTitlebar1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:overlayColor="#D1FFFFFF"
    app:blurRadius="30dp"
    app:showBack="true"
    app:menuIcon="?android:attr/actionModeWebSearchDrawable"
    app:titleText="Title Test"
    app:subtitleText="Subheading Test"
    app:centerTitle="false"/>

属性説明

属性名タイプ描写
app:titleTextstringタイトルテキスト
app:subtitleTextstringサブタイトルテキスト
app:titleTextColorcolorタイトル色
app:subtitleTextColorcolorサブタイトル色
app:showBackboolean戻るボタンを表示するかどうか
app:backIconreference戻るアイコンリソース
app:backIconTintcolor戻るアイコンの着色
app:menuTextstringメニューのテキスト
app:menuTextColorcolorメニューのテキスト色
app:menuIconreferenceメニューのアイコンリソース
app:menuIconTintcolorメニューのアイコン着色
app:centerTitlebooleanタイトルを中央に表示する

コードを使ってタイトルを中央に表示する

java
blurTitlebarView.setCenterTitle(true);