From df5f8da4e26551b9da42daf812fc5ff7e5be242d Mon Sep 17 00:00:00 2001 From: bilgehan kalkan Date: Tue, 17 Dec 2019 12:43:05 +0300 Subject: [PATCH] Add guides to images to prevent texts to stick left/write when images are GONE. --- .../src/main/res/layout/view_toolbar.xml | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/libraries/toolbar/src/main/res/layout/view_toolbar.xml b/libraries/toolbar/src/main/res/layout/view_toolbar.xml index 932a8bca..42c798f3 100644 --- a/libraries/toolbar/src/main/res/layout/view_toolbar.xml +++ b/libraries/toolbar/src/main/res/layout/view_toolbar.xml @@ -29,10 +29,9 @@ android:id="@+id/imageLeft" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/trendyol_uicomponents_toolbar_margin_outer" android:padding="@dimen/trendyol_uicomponents_toolbar_padding" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" + app:layout_constraintStart_toStartOf="@id/guideStart" app:layout_constraintTop_toTopOf="parent" app:toolbarDrawableResource="@{viewState.leftImageDrawableResId}" tools:srcCompat="@drawable/ic_arrow_back" @@ -75,10 +74,10 @@ android:maxLines="2" android:text="@{viewState.middleText}" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintWidth_percent="0.5" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" + app:layout_constraintWidth_percent="0.5" app:toolbarIsVisible="@{viewState.middleTextVisible}" app:toolbarTextAppearance="@{viewState.middleTextAppearance}" tools:text="Your Glorious App Name might be long" @@ -89,13 +88,13 @@ android:layout_width="0dp" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintWidth_percent="0.5" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" + app:layout_constraintWidth_percent="0.5" app:toolbarDrawableResource="@{viewState.middleImageDrawableResId}" tools:src="@android:mipmap/sym_def_app_icon" - tools:visibility="gone"/> + tools:visibility="gone" /> + + + +