title: Android Device onConfigurationChanged event does not handling orientation
body: <p>i have an activity and on startup of the activity i need to change the orientation in lanscape and then later on i want to handle both orientation changes as user rotates device , but it once changes the orientation and later on does not change the orientation. here is my code please help </p>
  
  <pre><code>    public class Hls extends Activity {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_hls);
  
      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  
  
  }
  
  
  
  @Override
  public void onConfigurationChanged(Configuration newConfig) {
      super.onConfigurationChanged(newConfig);
  
      Log.v("new orientation", "yes");
  
      if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT)
      {
          Toast.makeText(this, "portrait", Toast.LENGTH_LONG).show();
          setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
      }
      if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE)
      {
          Toast.makeText(this, "landscape", Toast.LENGTH_LONG).show();
          setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
      } 
  
  }
  </code></pre>