fix
This commit is contained in:
79
app/src/main/res/layout/custom_bottom_nav.xml
Normal file
79
app/src/main/res/layout/custom_bottom_nav.xml
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<!-- Первая вкладка -->
|
||||
<FrameLayout
|
||||
android:id="@+id/nav_item_1"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.15">
|
||||
<View
|
||||
android:id="@+id/circle_bg_1"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/bg_nav_circle_default" />
|
||||
<ImageView
|
||||
android:id="@+id/icon_1"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_phone_24" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Кнопка "Экстренное" (выступает и всегда красная) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/nav_item_emergency"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_marginBottom="-16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5">
|
||||
<View
|
||||
android:id="@+id/circle_bg_emergency"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:background="@drawable/bg_nav_circle_emergency" />
|
||||
<ImageView
|
||||
android:id="@+id/icon_emergency"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_emergency_24" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Вторая вкладка -->
|
||||
<FrameLayout
|
||||
android:id="@+id/nav_item_2"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.85">
|
||||
<View
|
||||
android:id="@+id/circle_bg_2"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/bg_nav_circle_default" />
|
||||
<ImageView
|
||||
android:id="@+id/icon_2"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_directions_24" />
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
Reference in New Issue
Block a user