I am starting off with a simple app when a button changes the text I want to change it from saying 'hello world' to 'hello brody' when I push a button here is what I got
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context="com.helloworld.app.MainActivity"> <TextView android:text="@string/hello_world" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="145dp" android:textSize="50dp" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" /> <ToggleButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="New ToggleButton" android:id="@+id/toggleButton" android:layout_centerVertical="true" android:layout_centerHorizontal="true" /> what can I do so that it changes the text ?
ToggleButtontext orTextViewtext?