Russell Bateman Messages: 3417 Registered: July 2009 Location: Provo, Utah, USA
On 2/4/2013 2:24 PM, Tyler Mayoff wrote:
> When I try that it tells me that button.setOnClickListener(****(); says
> that it is unreachable code
This isn't a Java forum or an Android forum; you're problem here has
been Java all along.
The reason the compiler tells you that it's unreachable code (after
fixing your first problem, the missing semicolon) is because you've coded:
smack in the middle of the method (and before the whole Button thing).
If you're following a tutorial, you haven't "squinted" hard enough and
have inserted the return by mistake. Yup, it's a little bewildering at
first (the whole anonymous class thing is a fuzzy syntax when you're not
used to it).