많은 것을 검색했지만 내 경우에는 아무 것도 작동하지 않는 것 같습니다. 다음은 상대 레이아웃을 사용하여 달성하고자하는 것입니다. 하나의 뷰를 xml의 다른 relativelayout에 두는 방법
아래 코드는 내 xml 코드입니다. 이 마이크를 수행함으로써
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:focusable="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/microphone" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/white"
android:padding="@dimen/padding_16">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:drawableRight="@drawable/arrow"
android:text="@string/next"
android:textAllCaps="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/arrow"
android:text="@string/previous"
android:textAllCaps="true" />
</RelativeLayout>
은 다음-이전 스트립 뒤에 숨겨져 있습니다. z 축에서 뷰 높이를 제어하는 매개 변수가 있다고 생각하지만 기억하지 못하고 Lolipop 아래에서도 작동합니다. 도와주세요.
좋아, 나는'android : elevation = "10dp"'가 z 축을 증가시킴으로써 앞쪽으로보기를 가져 오는 것을 발견했다. 하지만 Lolipop 아래에서 작동합니까? –
'아무것도 작동하지 않는 것 같습니다. '... 아마 [** FloatingActionButton **] (https://developer.android.com/reference/android/support/design/widget/FloatingActionButton.html)가됩니다. –
버튼 정의를 레이아웃의 끝으로 옮기면됩니다. – tynn