Original Author Paul Laughton, 2011
Page 233
De Re BASIC!
The section marked contains the names and values for the Screen Orientation preference. The top block
is the display names. The bottom block is the internal values that correspond to the display name. For
example the internal value of Fixed Reverse Landscape is 2.
To set a default value for Screen Orientation, we need to go back to settings.xml:
Find the <ListPreference> tag with android:title"="Screen Orientation". The title is the preference
name that you see on the Android screen. The default value is in the android:defaultValue ="0" line.
Here we see the default value for the screen orientation is "0". Looking at the Array.xml file we can see
the "0" is the internal name for Variable By Sensors. To change the default value to Fixed Reverse
Landscape, change the "0" to "2".
The other list preferences follow the same logic.
Note: Be sure to test your application with your chosen preferences before burning them into an APK.
Finished
Create your finished APK in the same way we created the practice APK.
Now that was not too bad, was it?