title: Showing Logcat message on screen orientation change
body: <p>I want to know when the orientation changes on my device using Logcat but it is not showing me any output (I'm using Android Studio). I've added the <code>screenSize</code> attribute to my <code>AndroidManifest.xml</code> but this doesn't fix the issue. Below is my manifest file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.danishrehman.orientationchangenotification" &gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
  
              android:name=".MainActivity"
              android:label="@string/app_name"
              android:configChanges="orientation|screenSize"
  
              &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>And here is my Java code:</p>
  
  <pre><code>package com.example.danishrehman.orientationchangenotification;
  
  import android.app.Activity;
  import android.content.res.Configuration;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.util.Log;
  
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      @Override
      public void onConfigurationChanged(Configuration newConfig) {
          super.onConfigurationChanged(newConfig);
          if(newConfig.orientation==Configuration.ORIENTATION_LANDSCAPE)
          {
              Log.d("LIFECYCLE","Welcome to Landscape Orientation");
          }
          else if (newConfig.orientation==Configuration.ORIENTATION_PORTRAIT)
          {
              Log.d("LIFECYCLE","Welcome to Portrait Orientation");
          }
      }
  }
  </code></pre>