So it looks like the problems are this:
1) The error on the button comes because you are missing a } at the end of the onCreateOptions() method. So that method has a line that returns true, then the line with the Button on it is considered to be part of the method, since you do not have the } bracket. Since the previous line was a return statement, there would be no way to get to the next line in the same method, and you get that error. But the problem is that you did not close the method.
2) The error for the extra token is because it is an extra token. The previous two lines are both }, one is closes the method setNewTextInTextView(), and the other one closes the class. So the one on the last line is one too many. Remove it, or remove the one above it (to keep bracket alignment).
3) The error on the t.start() line is probably because you are not putting that code in a method or initialization block. You can not execute arbitrary code the class body proper, you can only declare variables, constructors, methods, initialization blocks, and inner classes. To execute code you need a code block. Find a good method (such as the constructor or some other method that makes sense) in which the Thread
should be started. Note that the thread can only be started once. So make sure you are declaring it and using it appropriately.