title: android fragment setOnClickListener
body: <p>I use fragment and when i click on an editext an layou is shown whith an special keyboard, (many buttons clickable), but i can't find he correct way to detect the click on buttons</p>
  
  <p>here's the onCreateView code:</p>
  
  <pre><code>        public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) 
      {
          View view = inflater.inflate(R.layout.fragment_rsslist_overview,container, false);
                  try {
                      setKeys();
  
                  } catch (Exception e) {
                      Log.w(getClass().getName(), e.toString());
                  }
          //
  
          return view;
      }
  </code></pre>
  
  <p>Here's the setKeys code: (i've try many things on mBSpace button)</p>
  
  <pre><code>        public void setKeys() {
          mWindowWidth = getActivity().getWindowManager().getDefaultDisplay().getWidth(); // getting
          // window
          // height
          // getting ids from xml files
          mB[0] = (Button) getActivity().findViewById(R.id.xA);
          mB[1] = (Button) getActivity().findViewById(R.id.xB);
          mB[2] = (Button) getActivity().findViewById(R.id.xC);
          mB[3] = (Button) getActivity().findViewById(R.id.xD);
          mB[4] = (Button) getActivity().findViewById(R.id.xE);
          mB[5] = (Button) getActivity().findViewById(R.id.xF);
          mB[6] = (Button) getActivity().findViewById(R.id.xG);
          mB[7] = (Button) getActivity().findViewById(R.id.xH);
          mB[8] = (Button) getActivity().findViewById(R.id.xI);
          mB[9] = (Button) getActivity().findViewById(R.id.xJ);
          mB[10] = (Button) getActivity().findViewById(R.id.xK);
          mB[11] = (Button) getActivity().findViewById(R.id.xL);
          mB[12] = (Button) getActivity().findViewById(R.id.xM);
          mB[13] = (Button) getActivity().findViewById(R.id.xN);
          mB[14] = (Button) getActivity().findViewById(R.id.xO);
          mB[15] = (Button) getActivity().findViewById(R.id.xP);
          mB[16] = (Button) getActivity().findViewById(R.id.xQ);
          mB[17] = (Button) getActivity().findViewById(R.id.xR);
          mB[18] = (Button) getActivity().findViewById(R.id.xS);
          mB[19] = (Button) getActivity().findViewById(R.id.xT);
          mB[20] = (Button) getActivity().findViewById(R.id.xU);
          mB[21] = (Button) getActivity().findViewById(R.id.xV);
          mB[22] = (Button) getActivity().findViewById(R.id.xW);
          mB[23] = (Button) getActivity().findViewById(R.id.xX);
          mB[24] = (Button) getActivity().findViewById(R.id.xY);
          mB[25] = (Button) getActivity().findViewById(R.id.xZ);
          mB[26] = (Button) getActivity().findViewById(R.id.xS1);
          mB[27] = (Button) getActivity().findViewById(R.id.xS2);
          mB[28] = (Button) getActivity().findViewById(R.id.xS3);
          mB[29] = (Button) getActivity().findViewById(R.id.xS4);
          mB[30] = (Button) getActivity().findViewById(R.id.xS5);
          mB[31] = (Button) getActivity().findViewById(R.id.xS6);
          mBSpace = (Button) getActivity().findViewById(R.id.xSpace);
          mBdone = (Button) getActivity().findViewById(R.id.xDone);
          mBChange = (Button) getActivity().findViewById(R.id.xChange);
          mBack = (Button) getActivity().findViewById(R.id.xBack);
          mNum = (Button) getActivity().findViewById(R.id.xNum);
  //      for (int i = 0; i &lt; mB.length; i++)
          mBSpace.setOnClickListener( this);
  /*      
          mBSpace.setOnClickListener( new View.OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
                      edittext_onClick(v );
                  }
                });
  */          
  /*          
              mB[i].setOnClickListener( this);
          mBSpace.setOnClickListener( this);
          mBdone.setOnClickListener( this);
          mBack.setOnClickListener( this);
          mBChange.setOnClickListener( this);
          mNum.setOnClickListener( this);
  //      mNum.setOnClickListener( this);
  */      
  
  
      }
  </code></pre>
  
  <p>Does somebody known he correct syntax do to this?
  I've try call setkey() into :</p>
  
  <pre><code>    public void onActivityCreated (Bundle savedInstanceState){
      setKeys();
      super.onActivityCreated(savedInstanceState);
  }
  </code></pre>
  
  <p>I've no error but no click detection too...
  Thx in advance...</p>