- Forum posts: 1
Apr 5, 2016, 2:57:17 AM via Website
Apr 5, 2016 2:57:17 AM via Website
I am a newbie and want to create a quick app to see "if I can do it"
I appreciate anyone who would waste their time w me~~
I am getting "cannot find symbol class textview" ?
Just trying to make my phone display a number when the only button I have is clicked.
my code:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="End the World"
android:id="@+id/endbutton"
android:layout_below="@+id/textView"
android:layout_alignRight="@+id/textView"
android:layout_alignEnd="@+id/textView"
android:layout_marginTop="47dp"
android:onClick="myendMethod"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is a dumb test"
android:id="@+id/textView1"
android:textColor="#ad0b0b"
/>
public void myendmethod(View v)
{
int count=7;
TextView textView = (TextView)findViewById(R.id.textView1);
}
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.