I am using this code inside "CaptureImageActivity.java" activity.
So after execution of this activity my system's camera will open. 

btn1.setOnClickListener(new OnClickListener() {
            
            @Override
            public void onClick(View v) {
            
                Intent i=new Intent(android.provider.MediaStore. 
ACTION_IMAGE_CAPTURE);
                
i.putExtra(android.provider.MediaStore.EXTRA_SCREEN_ORIENTATION,ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
                
                
                startActivityForResult(i,1000);
                
            }
        });


And I want to lock that camera view to "LandScape Mode". And as per 
solution 

"<activity android:name=".CaptureImageActivity"
       * android:screenOrientation="landscape"*
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>"     

Only "CaptureImageActivity" activity is locked to "LandScape Mode".

On Monday, October 1, 2012 5:12:36 PM UTC+5:30, Felipe Silveira wrote:
>
> You can use attribute android:screenOrientation on the Manifest 
> declaration of your activity.
>
> For example:
>
> <activity android:screenOrientation="landscape" 
> android:configChanges="orientation|keyboardHidden" ... >
>
>
>
> On Mon, Oct 1, 2012 at 8:21 AM, kush <[email protected] <javascript:>>wrote:
>
>> I want to lock my camera view to "Landscape" mode.When I click on the 
>> simple button in my app, that time device's camera will open and and that 
>> camera should be locked to "Landscape mode". Can anyone know the solution 
>> of this problem?
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> -- 
> Felipe Silveira 
> http://www.felipesilveira.com.br            
> -------------------------------------------------
>  

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to