Я знаю, что можно установить пользовательские атрибуты со своими значениями в xml, но, возможно, это значение будет изменено позже во время выполнения?В Android можно изменить значение настраиваемого атрибута во время выполнения?
У меня есть этот XML:
<?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>
Я хочу изменить пример: state_valid к истинным или ложным во время выполнения.