Android Custom IME(Input method editor) 만들기
사용 버전: Android Studio 4.0
사용 언어: Kotlin 1.3.72
안드로이드 Custom IME(Input method editor) 만들기를 해보겠습니다.
IME를 간단히 설명하면 키보드입니다.
키보드를 만들어봅시다.
키보드로 사용할 Custom View가 필요합니다.
Class를 하나 만듭니다.
저는 MyIMEservice로 만들었습니다.

아래와 같이 수정합니다.


res 우 클릭 - New - Android resource File을 누릅니다.

File name, Resource type을 설정합니다.

다음과 같이 적습니다.

그리고, manifests로 갑니다.
<application> </application> 사이에 service를 넣습니다.

앱을 설치하고 실행합니다.

달라진 게 없습니다.
우리가 강제로 설정할 수 없습니다. 그 이유는 보안 문제 때문에 구글에서
막았습니다.
자, 이제 키보드를 설정해봅시다.
설정 - 언어 및 입력

가상 키보드

키보드 관리
우리가 만든 inAppKeyboard가 보입니다.
Manifest의 label이 이름으로 사용되고, xml의 imeSubtypeLocale이 아래 작은
설명으로 사용됩니다.


다시 돌아와서 키보드 관리로 들어갑니다.


짜잔, 기본 키보드가 다음과 같이 변경되었습니다.

어디를 가든 이 키보드가 사용됩니다.

끝.
카테고리: Android
댓글
댓글 쓰기
궁금한 점은 댓글 달아주세요.
Comment if you have any questions.