How can I change the text of an Android Button widget within code and not the XML file?
How can I change the text of an Android Button widget within code and not the XML file?
//text button:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" text button" />
// color text button:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text button"
android:textColor="@android:color/color text"/>
// background button
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text button"
android:textColor="@android:color/white"
android:background="@android:color/ background button"/>
// text size button
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text button"
android:textColor="@android:color/white"
android:background="@android:color/black"
android:textSize="text size"/>