I developed on application using android sdk 4.0 and I install that .apk file in my samsung tab. When I run that application it is working properly. If I change the tab portra
If you search first, you'll find this question answered already. I'll post the answer again here though.
Go to your manifest file, and under the activity that you want to keep portrait only, insert the following line
android:screenOrientation="portrait"
An example is given below.
this will make your activity forced to be in portrait mode only, even if you hold the device in landscape mode.