title: Android Orentation Changes
body: <p>I have a simple <code>Activity</code> called <code>SingleTouchTest</code> to make sense of screen touches. What is strange is that <code>SingleTouchTest</code> starts in whatever orientation I'm in but rotating the device does not result in screen rotation.</p>
  
  <p>My test device is an Acer A100 running Android 4.0.3.</p>
  
  <p>The main <code>Activity</code> contains a <code>ListView</code> that navigates to my test <code>Activity</code>es, including <code>SingleTouchTest</code>. I can run <code>SingleTouchTest</code> (full code below) without problems except rotation. In <code>AndroidManifest.xml</code> (full code below) I have tried every combination of</p>
  
  <p><code>android:configChanges="keyboard|keyboardHidden|orientation"</code>
  <code>android:screenOrientation="unspecified"</code></p>
  
  <p>and it does not auto rotate. I even removed the <code>onConfigurationChanged()</code> method from <code>SingleTouchTest</code> and nothing happens.</p>
  
  <p>Full code of <code>AndroidManifest.xml</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest 
      package="com.Bespoke.AndroidBasics"
      android:versionCode="1"
      android:versionName="1.0"
      android:installLocation="preferExternal" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK"/&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="Android Basics"&gt;
          &lt;activity
              android:name=".AndroidBasicsStarter"
              android:label="Android Basics"
              android:screenOrientation="unspecified"&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;activity
              android:name=".LifeCycleTest"
              android:label="Life Cycle Test"
              android:configChanges="keyboard|keyboardHidden|orientation" android:screenOrientation="unspecified"/&gt;
          &lt;activity
              android:name=".SingleTouchTest"
              android:label="Single Touch Test"
              android:configChanges="keyboard|keyboardHidden|orientation" android:screenOrientation="unspecified"/&gt;
          &lt;activity
              android:name=".MultiTouchTest"
              android:label="Single Touch Test"
              android:configChanges="keyboard|keyboardHidden|orientation" android:screenOrientation="unspecified"/&gt;
          &lt;activity
              android:name=".KeyTest"
              android:label="Key Test" android:screenOrientation="unspecified"/&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Full code of <code>SingleTouchTest</code>:</p>
  
  <pre class="lang-java prettyprint-override"><code>package com.Bespoke.AndroidBasics;
  
  import android.app.Activity;
  import android.content.res.Configuration;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.MotionEvent;
  import android.view.View;
  import android.view.View.OnTouchListener;
  import android.widget.TextView;
  
  public class SingleTouchTest extends Activity
                               implements OnTouchListener {
  
      StringBuilder builder = new StringBuilder();
      TextView textView;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          textView = new TextView(this);
          textView.setText("Touch and drag (one finger only!)");
          textView.setOnTouchListener(this);
          this.setContentView(textView);
      }
  
      public boolean onTouch(View v, MotionEvent event) {
          builder.setLength(0);  // clear the builder
          switch(event.getAction()) {
          case MotionEvent.ACTION_DOWN:
              builder.append("down, ");
              break;
          case MotionEvent.ACTION_MOVE:
              builder.append("move, ");
              break;
          case MotionEvent.ACTION_CANCEL:
              builder.append("cancel, ");
              break;
          case MotionEvent.ACTION_UP:
              builder.append("up, ");
              break;
          }
          builder.append(event.getX());
          builder.append(", ");
          builder.append(event.getY());
          String text = builder.toString();
          Log.d("TouchTest", text);
          textView.setText(text);
          return true;  // Consume the event, if false super.onTouch superceeds us
      }
  
       @Override
       public void onConfigurationChanged(Configuration  newConfig) {
         super.onConfigurationChanged(newConfig);
  
       }
  
  }
  </code></pre>