Skip to content

Android.widget.EditText

How to change the border color(un-focused) of an EditText?

참조: http://stackoverflow.com/questions/9224560/how-to-change-the-border-colorun-focused-of-an-edittext create a xml file with the following in drawable (say backwithborder.xml):

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="#00000000" />
    <stroke android:width="1dip" android:color="#ffffff" />
</shape>

EditText 읽기전용(read-only)으로 만드는 방법

EditText et = (EditText) findViewById(R.id.editText); 
et.setFocusable(false);
et.setClickable(false); // 이 부분은 아직 미확정이다.

그밖에 아래와 같은 속성이 존재한다.

editText.setFocusableInTouchMode(false);

How to change the border color(un-focused) of an EditText?

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="#00000000" />
    <stroke android:width="1dip" android:color="#ffffff" />
</shape>

See also

Favorite site