xml에 사용자 정의 속성을 값으로 설정할 수 있다는 것을 알고 있지만 런타임에 나중에이 값을 변경할 수 있습니까? 런타임에 true 또는 false로 state_valid :Android에서 런타임에 맞춤 속성의 값을 변경할 수 있습니까?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:example="http://schemas.android.com/apk/res/ValidatedButton.ValidatedButton"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<validatedbutton.ValidatedButton
android:id="@+id/myButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/icon_selector"
example:state_valid="false"
android:text="@string/hello" />
</LinearLayout>
내가 예를 변경하려면 :
나는이 XML이있다.