how to handle orientation of an linearlayout control in android
<p>![alt text][1]Hi folks </p>

<p>i am using admob ads for my android applicaiton.in portrait mode it fixed top of the screen when i changed to landscape mode.that add disply size of the portrait mode add size</p>

<p>how i get fill parent in landscape mode </p>

<pre><code>+import com.admob.android.ads.AdManager; import com.admob.android.ads.AdView; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.view.Window; import android.view.ViewGroup.LayoutParams; import android.widget.LinearLayout;

public class narasimha extends Activity   {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.main);
        AdView adView = new AdView(this);
        adView.setVisibility(AdView.VISIBLE);
        adView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        adView.setPrimaryTextColor(Color.BLACK);
        adView.setBackgroundColor(Color.WHITE);
        adView.setSecondaryTextColor(Color.LTGRAY);
        adView.setRequestInterval(20);
       AdManager.setTestDevices(new String[]{ AdManager.TEST_EMULATOR});
        ((LinearLayout)findViewById(R.id.ad)).addView(adView);
</code></pre>

<blockquote>
  <p>portrait mode   [1]:
  [url=http://www.freeimagehosting.net/][img]http://www.freeimagehosting.net/uploads/afd7c173cb.png[/img][/url]</p>
  
  <p>landscape mode
  [url=http://www.freeimagehosting.net/][img]http://www.freeimagehosting.net/uploads/1758519975.png[/img][/url]</p>
  
  <p>how can resolve this problem</p>
</blockquote>
