안드로이드 개발 질문/답변
(글 수 45,052)
<?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:text="seperator" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FFFF4500" android:textColor="#FFFFFFFF" />
위 처럼 정의한 다음에 include해서 TextView를 사용하고 싶습니다.
그런대 아래와 같이 사용해 보면 android:text속성이 변하지 않습니다.
<include android:text="" android:id="@+id/seperator" layout="@layout/seperator"/>
백그라운드나 텍스트컬러 같은 값도 안 바뀌는거 같네요.
소스코드에서 id를 이용해서 TextView를 얻어와서 변경해보면 잘 바뀌는 걸로 봐서 id는 확실히 오버라이드 되는거 같습니다.
원래 안되는 건가요? 방법이 없을까요~