tags:

views:

66

answers:

2

At the time of button click I need to show my data in landscape view.
How to show the data in landscape view?

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
+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.

More info

primalpop