title: How to reload the fragment with new dimensions when the screen orientation changes
body: <p>I have a fragment, in which a <strong>TextView</strong> takes it's width from folders:</p>
  
  <p><code>values</code> and <code>values-port</code>.</p>
  
  <p>and these values change when there is an orientation change, but the fragment's UI doesn't have any effect.</p>
  
  <p>In fact it actually picks values from <code>values-port</code> and:</p>
  
  <p><strong>if the device is in landscape mode: onConfigurationChanged() with new orientation as landscape is called.</strong></p>
  
  <p><strong>if the device is in portrait mode: onConfigurationChanged() is not called.</strong></p>
  
  <p>and when ever I change the orientation, then <code>onConfigurationChanged()</code> is definitely called.</p>
  
  <p>So,</p>
  
  <p>Why does it always starts with portrait mode?</p>
  
  <p>What to do to have the effect of dimensions change of the UI elements.</p>
  
  <p>I tried something like this in the fragment:</p>
  
  <pre><code>@Override
  public void onConfigurationChanged(Configuration newConfig) {
      super.onConfigurationChanged(newConfig);
      getView().requestLayout();
  }
  </code></pre>
  
  <p>But doesn't work.</p>
  
  <p>My <strong>TextView</strong> is always with the width from <code>values-port</code> folder.</p>
  
  <p><strong>EDIT : might seem redundant, but this is the code:</strong></p>
  
  <pre><code>&lt;activity
      android:name=".FeedActivity"
      android:configChanges="orientation|screenSize|keyboardHidden"
      android:screenOrientation="portrait" &gt;
  &lt;/activity&gt;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
  }
  </code></pre>
  
  <p>I know I could have removed <code>android:screenOrientation="portrait"</code> from the manifest instead of <code>setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);</code> in the Activity, but want to know the behavior with this code.</p>