Commit b1d17e78 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

fix tablayout flat plan types

parent 1b5cd5fc
......@@ -167,6 +167,12 @@ class EstateScreenController :
@BindView(R.id.start_tour_card)
lateinit var startTour: View
@BindView(R.id.info_tab_divider)
lateinit var infoTabDivicder: View
@BindView(R.id.start_tour_card_divider)
lateinit var startTourDivider: View
private fun setToolbar(){
toolBar.setToolbar(null, StatusToolbarModel())
......@@ -259,18 +265,17 @@ class EstateScreenController :
}
}
startTour.setGone(viewState.estate.multitourId == null)
startTourDivider.setGone(viewState.estate.multitourId == null)
when(viewState.estate.type){
FlatType.FLAT -> {
flatTypeView.setGone(false)
planTypesTabLayout.setGone(false)
planWebView.setGone(false)
infoTabDivicder.setGone(false)
explicationTab.setGone(false)
}
else -> {
flatTypeView.setGone(true)
planTypesTabLayout.setGone(true)
planWebView.setGone(true)
infoTabDivicder.setGone(true)
explicationTab.setGone(true)
}
}
......
......@@ -13,13 +13,30 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/flat_plan_type_selector_view"
<com.google.android.material.textview.MaterialTextView
android:id="@+id/flat_title"
style="@style/Header_TextView.Main_Header"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="..."
android:textAlignment="viewStart"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include
android:id="@+id/flatTypesCustomView"
layout="@layout/flat_plan_type_selector_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
app:layout_constraintTop_toBottomOf="@+id/flat_title" />
<include
android:id="@+id/switch_flat_content_tab"
......@@ -47,7 +64,7 @@
<include
android:id="@+id/include10"
android:id="@+id/start_tour_card_divider"
layout="@layout/horizontal_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
......@@ -65,7 +82,7 @@
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include10" />
app:layout_constraintTop_toBottomOf="@+id/start_tour_card_divider" />
<include
android:id="@+id/include11"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.textview.MaterialTextView
android:id="@+id/flat_title"
style="@style/Header_TextView.Main_Header"
android:layout_width="0dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="16dp"
android:text="Кв..."
android:textAlignment="viewStart"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
android:orientation="vertical"
tools:ignore="WebViewLayout">
<com.google.android.material.tabs.TabLayout
android:id="@+id/planTypesTabs"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/flat_title"
app:tabMaxWidth="@dimen/tab_max_width"
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_gravity="bottom"
android:layout_marginStart="16dp"
android:padding="0dp"
app:tabPaddingStart="0dp"
app:tabPaddingEnd="0dp"
app:tabPaddingTop="0dp"
app:tabPaddingBottom="0dp"
app:tabMinWidth="0dp"
app:tabMode="scrollable" />
<include
android:id="@+id/include5"
layout="@layout/horizontal_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:minHeight="200dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -46,7 +38,7 @@
<com.google.android.material.textview.MaterialTextView
android:id="@+id/textView19"
style="@style/Common_Text.Default"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
......@@ -64,6 +56,7 @@
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:minHeight="200dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView19" />
......@@ -73,10 +66,9 @@
android:id="@+id/include6"
layout="@layout/horizontal_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -84,7 +76,7 @@
<LinearLayout
android:id="@+id/sizes_switch_container"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
......@@ -117,10 +109,9 @@
android:id="@+id/include7"
layout="@layout/horizontal_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -128,7 +119,7 @@
<LinearLayout
android:id="@+id/furniture_switch_container"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
......@@ -161,10 +152,9 @@
android:id="@+id/include8"
layout="@layout/horizontal_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -172,7 +162,7 @@
<LinearLayout
android:id="@+id/electricity_switch_container"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
......@@ -201,15 +191,13 @@
</LinearLayout>
<include
android:id="@+id/walls_divider"
layout="@layout/horizontal_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -218,7 +206,7 @@
<LinearLayout
android:id="@+id/walls_switch_container"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
......@@ -259,4 +247,4 @@
app:layout_constraintTop_toBottomOf="@+id/walls_switch_container" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</LinearLayout>
......@@ -14,7 +14,7 @@
android:text="Общая информация" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/textView21"
android:id="@+id/info_tab_divider"
style="@style/Default_TextView.Accent_Text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment