현재 프로젝트를 작업중에 뷰의 하단에 바텀시드가 있고 그 바텀시트 위에 몇가지 뷰가 위치하고 있는대 바텀시트가 펼쳐질때, 다시 줄어들 때 항상 바텀시트의 마진 10dp 정도의 간격으로 위치시키고 싶은대 방법이 있을까요?
above를 써서 상대 위치로 지정을했지만 뷰가 오락가락합
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".HomeFragment">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/home_map"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageButton
android:id="@+id/marker_test"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="315dp"
android:layout_marginLeft="150dp"
android:visibility="invisible"
android:background="@null"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/home_toolbar"
android:layout_marginTop="50dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="horizontal">
<ImageButton
android:id="@+id/home_menu"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginLeft="10dp"
android:background="@null"
android:src="@drawable/baseline_menu_24"/>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"
android:layout_marginRight="10dp"
android:gravity="center_vertical"/>
<com.google.android.material.tabs.TabLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white">
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="위치공유"
android:textColor="@color/white"
android:background="@drawable/btn_white_blackstroke"/>
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="안심이동"
android:textColor="@color/black"/>
</com.google.android.material.tabs.TabLayout>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"
android:layout_marginRight="10dp"
android:gravity="center_vertical"/>
<ImageButton
android:id="@+id/alarm_menu"
android:layout_width="45dp"
android:layout_height="45dp"
android:background="@null"
android:src="@drawable/baseline_notifications_24"
android:layout_marginLeft="10dp"/>
</LinearLayout>
<ImageButton
android:id="@+id/home_sos_btn"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_below="@id/home_toolbar"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:src="@drawable/baseline_sos_24"
android:background="@drawable/btn_sos"/>
<ImageButton
android:id="@+id/home_gps_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gps_fixed_24"
android:layout_alignParentBottom="true"
android:layout_above="@id/bottom_group_all"
android:layout_alignParentRight="true"/>
<Button
android:id="@+id/bottom_group_all"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:text="그룹원 모두보기"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:textColor="@color/white"
android:background="@drawable/btn_black_black"
android:layout_alignParentRight="true"
android:layout_above="@id/bottom_view"
android:layout_gravity="center"
android:textSize="8sp"/>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/bottom_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_alignParentBottom="true"
app:behavior_hideable="false"
app:behavior_peekHeight="200dp">
<include layout="@layout/bottom_sheet" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</RelativeLayout>
</RelativeLayout>
니다.