본문 바로가기

개발도구/aOS - 안드로이드 개발

[안드로이드] EditText 클릭후 text 없애기 EditText 클릭시 초기화 방법

EditText 부분을 XML에서
   android:id="@+id/say_hello"
   android:text="안녕하세요."
   android:layout_height="wrap_content"
   android:layout_width="wrap_content"
   android:layout_weight="1.0"
   android:lines="1" />

edittext 클릭하면 안녕하세요 사라지게 하려면
android:hint="안녕하세요" 라고
text -> hint 로 변경해주면 간단히 된다.