title: findViewById not working in fragment
body: <p>findViewById not working in fragment Here Iam Trying to add an listview to the specific fragment But i can't map the listview control using find viewBy Id
  I am beginner to the android development I have no idea about implement the fragment
  Can anyone help me ?</p>
  
  <pre><code>public class FindPeopleFragment extends Fragment {
  
  public FindPeopleFragment(){}
  private static final String TAG = "CardListActivity";
  private CardArrayAdapter cardArrayAdapter;
  private ListView listView;
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
  
  
      View rootView = inflater.inflate(R.layout.fragment_find_people, container, false);
  
      return rootView;
  
      listView = (ListView) findViewById(R.id.card_listView);
  
      listView.addHeaderView(new View(this));
      listView.addFooterView(new View(this));
  
      cardArrayAdapter = new CardArrayAdapter(getApplicationContext(), R.layout.list_item_card);
  
      for (int i = 0; i &lt; 10; i++) {
          Card card = new Card("Card " + (i+1) + " Line 1", "Card " + (i+1) + " Line 2");
          cardArrayAdapter.add(card);
      }
      listView.setAdapter(cardArrayAdapter);
  
  
  }
  public class CardArrayAdapter  extends ArrayAdapter&lt;Card&gt; {
      private static final String TAG = "CardArrayAdapter";
      private List&lt;Card&gt; cardList = new ArrayList&lt;Card&gt;();
  
      public class CardViewHolder {
          TextView line1;
          TextView line2;
      }
  
      public CardArrayAdapter(Context context, int textViewResourceId) {
          super(context, textViewResourceId);
      }
  
      @Override
      public void add(Card object) {
          cardList.add(object);
          super.add(object);
      }
  
      @Override
      public int getCount() {
          return this.cardList.size();
      }
  
      @Override
      public Card getItem(int index) {
          return this.cardList.get(index);
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View row = convertView;
          CardViewHolder viewHolder;
          if (row == null) {
              LayoutInflater inflater = (LayoutInflater) this.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              row = inflater.inflate(R.layout.list_item_card, parent, false);
              viewHolder = new CardViewHolder();
              viewHolder.line1 = (TextView) row.findViewById(R.id.line1);
              viewHolder.line2 = (TextView) row.findViewById(R.id.line2);
              row.setTag(viewHolder);
          } else {
              viewHolder = (CardViewHolder)row.getTag();
          }
          Card card = getItem(position);
          viewHolder.line1.setText(card.getLine1());
          viewHolder.line2.setText(card.getLine2());
          return row;
      }
  
      public Bitmap decodeToBitmap(byte[] decodedByte) {
          return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length);
      }
  }
  </code></pre>
  
  <p>}</p>