At the time of button click I need to show my data in landscape view.
How to show the data in landscape view?
views:
66answers:
2
A:
The simplest method would be to use a separate Activity to display the data and in your manifest add the following attribute to the activities declaration;
android:screenOrientation="landscape"
You can find more information on that setting at http://developer.android.com/guide/topics/manifest/activity-element.html
Al Sutton
2010-07-02 05:41:20
+2
A:
Add the following line in the onClick event of the button.
yourActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
The constants that should be used are defined in the ActivityInfo class.
primalpop
2010-07-02 06:06:32