title: different design for portrait and landscape mode in android
body: <p>Hi i have created two fragments on single layout.</p>
  
  <p>In layout-land :</p>
  
  <p>fragments need to display horizontally.</p>
  
  <p>In layout-port :
  fragments need to display vertically.</p>
  
  <p>Now i have to run the app on portrait mode means displaying the fragment vertically.
  now i have to rotate these to landscape mode means displaying the fragments vertically only.</p>
  
  <p>At the same time i have to run the app on landscape mode means displaying the fragment horizontally.now i have to rotate these to portrait mode means displaying the fragment horizontally.</p>
  
  <p>But i wish to display the output like:</p>
  
  <p>i have to run the app on portrait mode means displaying the fragment vertically.
  now i have to rotate these to landscape mode means displaying the fragments horizontally.</p>
  
  <p>At the same time i have to run the app on landscape mode means displaying the fragment horizontally.now i have to rotate these to portrait mode means displaying the fragment vertically.</p>
  
  <p>How can i do ???</p>
  
  <p>Why am getting the result like above.please give me any suggestions .</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p><strong>layout-land : fragment.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical"
  android:id="@+id/_listDetails"
  
  &gt;
     &lt;ImageView
          android:id="@+id/refresh"
          android:layout_width="wrap_content"
          android:layout_height="45dp"
  
          android:layout_gravity="center_vertical"
          android:layout_toLeftOf="@+id/pos"
          android:src="@drawable/ref_off" /&gt;
  &lt;LinearLayout 
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:layout_below="@+id/layout"
  android:background="#414042"
  android:orientation="horizontal" &gt;
  
  &lt;fragment
    android:id="@+id/activity_main"
    android:name="com.notch.notchbolly.MainActivity"
    android:layout_width="0px"
    android:layout_height="match_parent"
    android:layout_weight="0.83"
  
    /&gt;
    &lt;View
      android:layout_width="2dp"
      android:layout_height="fill_parent"
      android:background="#FFFFFF"
      /&gt;
   &lt;fragment
    android:id="@+id/subcate"
    android:name="com.notch.notchbolly.SubCate"
    android:layout_width="0px"
    android:layout_height="match_parent"
    android:layout_weight="1" /&gt;
    &lt;/LinearLayout&gt;
    &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>layout-port: fragment.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical"
  android:id="@+id/_listDetails"
  
   &gt;
    &lt;ImageView
           android:id="@+id/refresh"
          android:layout_width="wrap_content"
          android:layout_height="45dp"
  
          android:layout_gravity="center_vertical"
          android:layout_toLeftOf="@+id/pos"
          android:src="@drawable/ref_off" /&gt;
  &lt;LinearLayout 
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:layout_below="@+id/layout"
  android:background="#414042"
  android:id="@+id/orien"
  android:orientation="vertical"
   &gt;
  
  &lt;fragment
    android:id="@+id/activity_main"
    android:name="com.notch.notchbolly.MainActivity"
    android:layout_width="fill_parent"
    android:layout_height="200dp"
  
    /&gt;
   &lt;View
      android:layout_width="fill_parent"
      android:layout_height="3dp"
      android:background="#FF0000"
      /&gt;
  &lt;fragment
    android:id="@+id/subcate"
    android:name="com.notch.notchbolly.SubCate"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    /&gt;
  
  
     &lt;/LinearLayout&gt;
     &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>This is my AndroidListFragmentActivity:</p>
  
  <pre><code>    public  class AndroidListFragmentActivity extends FragmentActivity  {
  
  
         /** Called when the activity is first created. */
      @Override
        public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.fragment);
  
      ImageView refresh = (ImageView) findViewById(R.id.refresh);
          refresh.setOnClickListener(new OnClickListener() {
              public void onClick(View v) {
  
                  Intent in = new Intent(AndroidListFragmentActivity.this, AndroidListFragmentActivity.class);
                  startActivity(in);
                  } 
              }); 
  
  
  
                  }
              @Override
              public void onConfigurationChanged ( Configuration newConfig )
                {
                super.onConfigurationChanged(newConfig);
  
          }
  
          }
  </code></pre>