title: Android , Admob / Adview takes|steals focus from edittext , How to prevent?
body: <p>I am creating views and add these views to a linearlayout , These input is taken from edittext at the bottom of the screen like a messanger application. Whenever i push the 'done' button it triggers and add that message to that message linearlayout. </p>
  
  <p>The problem :</p>
  
  <p>When i want to put adview between those messages e.g. between every 10 message. Edittext is losing focus and that causes whole layout to scroll down. </p>
  
  <p>What i want :</p>
  
  <p>Edittext should not lose the focus and everytime it should be active waiting for input with keyboard open.</p>
  
  <p>What i tried and did not work :</p>
  
  <pre><code>if (messageCounter % 10 == 0) {
  
          LinearLayout advertisedMessageLayout = new LinearLayout(this);
          advertisedMessageLayout.setOrientation(LinearLayout.VERTICAL);
          advertisedMessageLayout.setLayoutParams(new LayoutParams(
                  LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
  
          AdView av = new AdView(this, AdSize.BANNER, MBConstants.ADVIEW_ID);
          //remove focus for every child of adview
          for (int i = 0; i &lt; av.getChildCount(); i++) {
              av.getChildAt(i).setFocusable(false);
              av.getChildAt(i).setFocusableInTouchMode(false);
              av.getChildAt(i).setClickable(false);
  
          }
          av.setFocusable(false);
          av.setFocusableInTouchMode(false);
          av.setClickable(false);
          av.setEnabled(false);
  
          AdRequest request = new AdRequest();
          av.loadAd(request);
  
          advertisedMessageLayout.addView(messageRow);
          advertisedMessageLayout.addView(av);
  
  
          return advertisedMessageLayout;
  
      }
  </code></pre>
  
  <p>Is there any possible way to prevent adview to take focus and behave like a normal view ?</p>
  
  <p>Thanks.</p>