1
Android : Offset ImageView in Center 약간
다음 이미지가 가운데에 있다고 가정합니다. 이렇게하려면 다음 코드를 사용합니다.
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="10"
android:orientation="vertical" >
<ImageView
android:src="@drawable/logo"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
이것은 데드 센터 위치 지정을 위해 작동하고 있습니다. 나는 다음과 같이하고 싶다. 약간 상향 조정한다. 보시다시피 이미지가 중심선을 가로 지르는 것을 원하지 않습니다 (보이지 않는 뷰를 추가하여 이미지를 수정하는 방법을 알고 있습니다).
완벽하게 작동 해 주셔서 감사합니다. 나는 앵커 뷰에서'paddingBottom'을 필요로하지 않았다. – Mike76