티스토리 뷰

728x90

핵심 코드

 

android:privateImeOptions="defaultInputmode=korean"
android:privateImeOptions="defaultInputmode=english"

 


설명

 

위 코드를 활용하여 EditText 에 기본 언어를 설정할 수 있습니다.


전체 코드

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:focusable="true"
    android:focusableInTouchMode="true"
    tools:context=".MainActivity">

    <EditText
        android:privateImeOptions="defaultInputmode=korean"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

</LinearLayout>

 

구동 화면

(1) android:privateImeOptions="defaultInputmode=korean"

(2) android:privateImeOptions="defaultInputmode=english"

728x90
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
글 보관함