title: Android Fragment onAttach Error
body: <p>i have problem on my on Attach its doing red line on him and writing me :</p>
  
  <p>"overrides deprecated method in 'android.support.v4.app.Fragment' "</p>
  
  <p>Please help me understand what i am doing wrong ?
  ty you for all the helpers !! </p>
  
  <pre><code>package com.example.omermalka.memecreator;
  
      import android.app.Activity;
      import android.support.v4.app.Fragment;
      import android.os.Bundle;
      import android.view.LayoutInflater;
      import android.view.View;
      import android.view.ViewGroup;
      import android.widget.Button;
      import android.widget.EditText;
      /**
       * Created by omermalka on 14/11/2015.
       */
  
  
  
      public class TopSectionFragment extends Fragment {
  
          private static EditText TopText;
          private static EditText BottomText;
  
          TopSectionListener acitivtyCommander;
  
          public interface TopSectionListener{
              public void createMime(String top , String Bottom);
          }
  
  
          @Override
          public void onAttach(Activity activity) {
              super.onAttach(activity);
              try{
                  acitivtyCommander = (TopSectionListener) activity;
              }catch (ClassCastException e){
                  throw new ClassCastException(activity.toString());
              }
          }
  
          public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
              View view = inflater.inflate(R.layout.top_section_fragment, container, false);
  
              TopText = (EditText) view.findViewById(R.id.TopTextInput);
              BottomText = (EditText) view.findViewById(R.id.BottomTextInput);
              final Button button = (Button) view.findViewById(R.id.BottomTextInput);
  
              button.setOnClickListener(
                      new View.OnClickListener() {
  
                          @Override
                          public void onClick(View v) {
                              buttonClicked(v);
                          }
                      }
              );
  
  
  
              return view;
      }
  
  
          public void buttonClicked(View v) {
              acitivtyCommander.createMime(TopText.getText().toString(),BottomText.getText().toString());
          }
  
      }
  </code></pre>