0
친절하게 이미지를 보시고, 이처럼 아래쪽 탭을 만들고 싶습니다. 어떻게 안드로이드에서 하단 레이아웃을 만들 수 있습니까?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar"
tools:context="com.ambeez.MainMapActivity" />
<Button
android:id="@+id/rescue_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_margin="10dp"
android:background="@drawable/border_radius_btn"
android:text="Rescue Me"
android:textColor="@android:color/white"
android:textSize="18dp"
android:visibility="gone" />
<RelativeLayout
android:id="@+id/rltLyt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
android:background="@android:color/darker_gray"
android:visibility="gone">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="Nearest Available Rescue Person"
android:textColor="@android:color/holo_red_dark"
android:textSize="16dp" />
<ListView
android:id="@+id/rescue_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/name"
android:layout_marginTop="10dp"
android:visibility="gone"></ListView>
</RelativeLayout>
<RelativeLayout
android:id="@+id/btm_lyt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true">
<View
android:id="@+id/parent_view"
android:layout_width="match_parent"
android:layout_above="@+id/bottom_bar"
android:background="@android:color/transparent"
android:layout_height="20dp"/>
<LinearLayout
android:layout_width="match_parent"
android:id="@+id/bottom_bar"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="5dp"
android:weightSum="5">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<ImageView
android:id="@+id/my_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/profile" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageView
android:id="@+id/call_history"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/notification" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="70dp"
android:layout_weight="1"
android:layout_marginTop="-20dp"
android:background="@drawable/cirlce_layout"
android:gravity="center">
<ImageView
android:id="@+id/contact_us"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ambulance_with_moon" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageView
android:id="@+id/about_us"
android:layout_width="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_height="wrap_content"
android:src="@drawable/call_history" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageView
android:id="@+id/sign_out"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/help" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
친절하게 나에게 적합한 솔루션을 말한다. 여기 내 레이아웃 코드입니다. 하단 바를 이미지처럼 똑같이 만들려고 노력하고 있지만, 내 중앙 이미지가 조각이나 뷰 뒤에 숨어 있습니다. 이 구글의 SDK의 일부입니다
난 그냥 [이] (https://github.com/roughike/BottomBar) 라이브러리를 사용하는 것, 당신의 한 가지 레이아웃으로 모든 것을 집어 넣으려고합니다. 레이아웃에서 메뉴를 분리하고 올바르게 오버레이해야합니다. 라이브러리를 따라 가면이 작업을 수행 할 수 있습니다. – skryshtafovych