마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 카메라 세워서 찍으면 세워서 나오고 눕혀서 찍으면 눕혀서 나오게 하는것좀 도아주세요.

0 추천

android carmera 사진이 눕혀서 나옵니다. 해결방법좀 알려주세요 ㅠ

 

 

세로로 찍었을땐 세로로 나오고 가로로 찍었을땐 가로로 나오게 하고 싶습니다. .ㅠ.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mLayout"
    android:background="@color/bg"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
  	
    <LinearLayout 
		android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center"
        android:layout_weight="70" >       
        
	    <ImageView
	        android:id="@+id/resultImage"
            android:layout_width="match_parent"
			android:layout_height="match_parent"
			/>
        
    </LinearLayout>
  
   <LinearLayout
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_weight="30"
		android:orientation="vertical">
	    <LinearLayout
	        android:layout_width="match_parent"
	        android:layout_height="fill_parent"
	        android:orientation="horizontal" 
	        >
	  
	        <ImageButton
	            android:id="@+id/EditBtn"
	            android:layout_width="0dp"
	            android:layout_weight="1"
	            android:layout_height="match_parent" />
	  
	        <ImageButton
	            android:id="@+id/CropBtn"
	            android:src="@drawable/cut"
	            android:scaleType="fitXY"
		        android:adjustViewBounds="true"
		        android:cropToPadding="false"
		        android:layout_width="wrap_content"
	            android:layout_height="match_parent" />
	  
	        <ImageButton
	            android:id="@+id/ChangeBtn"
	            android:layout_width="0dp"
	            android:layout_weight="1"
	            android:layout_height="match_parent" />
	
	    </LinearLayout>
	</LinearLayout>
</LinearLayout>

 

 

if (requestCode == CAPTURE_VIDEO_ACTIVITY_REQUEST_CODE) {
	        if (resultCode == RESULT_OK) {
	            // Video captured and saved to fileUri specified in the Intent
	            Toast.makeText(this, "Video saved to:\n" +
	                     data.getData(), Toast.LENGTH_LONG).show();
	            
	            Intent imageEdit = new Intent(MainActivity.this, ImageEditMainActivity.class);
	            imageEdit.putExtra("Path", data.getData().toString());
	            startActivity(imageEdit);
	            
	        } else if (resultCode == RESULT_CANCELED) {
	            // User cancelled the video capture
	        } else {
	            // Video capture failed, advise user
	        }
	    }

 

바밥 (420 포인트) 님이 2015년 5월 15일 질문

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...