title: Wont find R.Id. in fragment
body: <p>I'm trying to get a text view to link to a site, but it won't find the id from xml in android. Any help would be great. Here's the code</p>
  
  <p>It wont find the R.id.textviewlink</p>
  
  <pre><code>public class Fragment_2 extends Fragment{
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
  
          return inflater.inflate(R.layout.fragment_2, null);
  
          TextView t2 = (TextView) getView().findViewById(R.id.textviewlink);
          t2.setMovementMethod(LinkMovementMethod.getInstance());
      }
  }
  </code></pre>
  
  <p>XML</p>
  
  <pre><code> &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  android:paddingTop="10dip"
  android:paddingLeft="10dip"
  android:paddingRight="10dip" 
  android:background="@drawable/backgroundw"&gt;
  
  &lt;ScrollView
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"&gt;
  &lt;LinearLayout 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"&gt;
  
              &lt;TextView
      android:id="@+id/textviewlink"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:gravity="center"
      android:text="Free PDF Download"
      android:linksClickable="true"/&gt;
  
      &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
      &lt;/RelativeLayout&gt;
  </code></pre>