Merge pull request #354 from cypressious/fix-activation-button-bar

Fix button bar layout in onboarding activation for smaller widths
This commit is contained in:
Gregory K 2022-11-13 17:48:54 +03:00 committed by GitHub
commit 56b42071ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 79 additions and 36 deletions

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/button_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorBackgroundLight"
android:outlineProvider="bounds"
android:orientation="horizontal"
android:clipToPadding="false"
android:elevation="3dp"
tools:showIn="@layout/fragment_onboarding_activation">
<Button
android:id="@+id/btn_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
style="?secondaryLargeButtonStyle"
android:text="@string/resend" />
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<Button
android:id="@+id/btn_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
style="?primaryLargeButtonStyle"
android:text="@string/open_email_app" />
</LinearLayout>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/button_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorBackgroundLight"
android:clipToPadding="false"
android:elevation="3dp"
android:orientation="horizontal"
android:outlineProvider="bounds"
android:gravity="center_vertical"
tools:showIn="@layout/fragment_onboarding_activation">
<Button
android:id="@+id/btn_back"
style="?secondaryLargeButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:text="@string/resend" />
<Button
android:id="@+id/btn_next"
style="?primaryLargeButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="16dp"
android:layout_weight="1"
android:text="@string/open_email_app" />
</LinearLayout>

View File

@ -51,41 +51,6 @@
</ScrollView>
<LinearLayout
android:id="@+id/button_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorBackgroundLight"
android:outlineProvider="bounds"
android:orientation="horizontal"
android:clipToPadding="false"
android:elevation="3dp">
<Button
android:id="@+id/btn_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
style="?secondaryLargeButtonStyle"
android:text="@string/resend"/>
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1"/>
<Button
android:id="@+id/btn_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
style="?primaryLargeButtonStyle"
android:text="@string/open_email_app" />
</LinearLayout>
<include layout="@layout/button_bar_activation" />
</me.grishka.appkit.views.FragmentRootLinearLayout>