AndroidSecurityKeyboard
一个通用的Android密码输入安全键盘
Install / Use
/learn @tangqifa/AndroidSecurityKeyboardREADME
Android安全密码键盘
简介
在财经和银行类应用中,app通常会提供自己安全键盘,以防密码泄露;

使用
第一步:在需要安全键盘的Activity或则Fragment的布局文件中加入如下代码:
<android.inputmethodservice.KeyboardView
android:id="@+id/keyboard_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:keyBackground="@drawable/btn_keyboard_key"
android:keyTextColor="#ffffffff"
android:visibility="gone" />
如果根布局不是RelativeLayout,则在底部加入如下代码:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.inputmethodservice.KeyboardView
android:id="@+id/keyboard_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:keyBackground="@drawable/btn_keyboard_key"
android:keyTextColor="#ffffffff"
android:visibility="gone" />
<RelativeLayout/>
第二步:在需要安全键盘的Activity或则Fragment的onCreate()方法或则onCreateView()方法中加入如下代码:
KeyboardView mKeyboardView;
mKeyboardView = (KeyboardView)findViewById(R.id.keyboard_view);
new SecKeyboardView(this, mPassword,mKeyboardView);
Android Studio快速集成
dependencies {
compile 'com.kejiwen.securitykeyboard:securitykeyboardlibrary:1.0.0'
}
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
