2012-08-05 2 views
2

내 이미지 뷰의 일부만 화면에 표시하고 싶습니다. 지금은 상대적 레이아웃 하단 오른쪽입니다. 아래 첫 번째 스크린 샷의 파란색 원 ..회전 할 때까지 ImageView의 일부를 오프 스크린으로 표시합니까?

파란색 원이 '확장 가능'메뉴가됩니다 버튼/서랍. 내가하고 싶은 방식은 원의 왼쪽 위 사분면을 표시 한 다음 누군가가 파란색 영역을 터치 할 때 회전 시켜서 원의 나머지 절반을 표시합니다 (상단에 버튼을 추가합니다).

첫 번째 스크린 샷은 제가 지금 가지고있는 것입니다. 두 번째 스크린 샷은 대부분의 원을 화면 밖으로 밀어 내고 싶습니다.

이 기능이 지원됩니까?

enter image description here

+0

을, 나는 원 자체를 애니메이션에 대한 참조 코드를 보았다, 나는 프로그래밍 이전에 버튼을 추가했습니다. 오늘 붙어있는 주요 부분은 이미지 뷰 (내 파란색 원)의 중심을 맨 아래 오른쪽 모서리까지 밀어내는 방법입니다. –

답변

3

What I have now, but I want the center of the circle at the very bottom right pixel of my layout, not the corner of the circle.. I want most of the circle actually off screen at first.

이 지원됩니까?

예, 당신은 부정적인 여백 사용할 수 있습니다 : 그런데

<RelativeLayout 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

    <ImageView 
     android:layout_width="48dp" 
     android:layout_height="48dp" 
     android:layout_alignParentBottom="true" 
     android:layout_alignParentRight="true" 
     android:layout_marginBottom="-24dp" 
     android:layout_marginRight="-24dp" 
     android:src="@drawable/ic_launcher" /> 
</RelativeLayout> 
관련 문제