android.inputmethodservice.KeyboardView 自定义键盘 字体大小设置
16lz
2021-01-23
KeyboardView 设置自定义键盘上文本的属性,其中字体的设置用:android:keyTextSize android:labelTextSize即可实现!! 亲测!
<android.inputmethodservice.KeyboardView
android:id="@+id/add_keyboard_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:keyBackground="@drawable/keyboard_key"
android:keyTextColor="@color/c_black"
android:labelTextSize="50sp"
android:keyTextSize="50sp" />
android:keyBackground | Image for the key. | |
android:keyPreviewLayout | Layout resource for key press feedback. | |
android:keyPreviewOffset | Vertical offset of the key press feedback from the key. | |
android:keyTextColor | Color to use for the label in a key. | |
android:keyTextSize | Size of the text for character keys. | |
android:labelTextSize | Size of the text for custom keys with some text and no icon. | |
android:popupLayout | Layout resource for popup keyboards. | |
android:verticalCorrection | Amount to offset the touch Y coordinate by, for bias correction. |
更多相关文章
- RecylcerView中的子view matchParent属性失效的问题
- 【Android】Android中 Paint 字体、粗细等属性的一些设置
- 安卓笔记:安卓控件属性大全
- android layout属性 .
- Android中使EditText失去焦点,edittext禁止弹出键盘
- fullScreen时的软键盘监听(非重写Layout方式)