diff options
author | cyBerta <cyberta@riseup.net> | 2023-08-07 03:03:49 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-08-07 03:03:49 +0200 |
commit | 28f8f7124ad96670c14fd96c8e9d1caf9a7848e5 (patch) | |
tree | ee1f2aa32b768770c47fc12e1c06240f30233620 /app/src/main/res | |
parent | 93b7a453484535efb037e11e3cd457efe2b66dc8 (diff) |
tweak setup success fragment, so that the main button has always the same size as in EIP fragment (different layouts for tablets, phones, landscape, portrait)
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout-port/f_setup_success.xml | 81 | ||||
-rw-r--r-- | app/src/main/res/layout-sw600dp-port/f_setup_success.xml | 81 | ||||
-rw-r--r-- | app/src/main/res/layout-xlarge-port/f_setup_success.xml | 82 | ||||
-rw-r--r-- | app/src/main/res/layout-xlarge/f_setup_success.xml | 82 | ||||
-rw-r--r-- | app/src/main/res/layout/f_setup_success.xml | 51 |
5 files changed, 356 insertions, 21 deletions
diff --git a/app/src/main/res/layout-port/f_setup_success.xml b/app/src/main/res/layout-port/f_setup_success.xml new file mode 100644 index 00000000..7b13261f --- /dev/null +++ b/app/src/main/res/layout-port/f_setup_success.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".providersetup.fragments.ProviderSelectionFragment"> + + <androidx.constraintlayout.widget.Guideline + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:id="@+id/top_button_guideline" + app:layout_constraintGuide_percent="0.6" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_vertical_left" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.3" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_vertical_right" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.7" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/bottom_button_guideline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="72dp" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="@dimen/stdpadding" + android:layout_margin="@dimen/activity_margin" + app:layout_constraintTop_toTopOf="parent" + > + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:text="@string/title_setup_success" + android:paddingBottom="@dimen/stdpadding" + /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_setup_success_description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_constraintTop_toBottomOf="@id/tv_title" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + android:text="@string/setup_success_description"/> + </LinearLayout> + + <se.leap.bitmaskclient.base.views.MainButton + android:id="@+id/main_button" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_margin="@dimen/mainbutton_padding" + app:layout_constraintTop_toBottomOf="@id/top_button_guideline" + app:layout_constraintBottom_toTopOf="@id/bottom_button_guideline" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right" + app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left" + /> + +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout-sw600dp-port/f_setup_success.xml b/app/src/main/res/layout-sw600dp-port/f_setup_success.xml new file mode 100644 index 00000000..52fca8dd --- /dev/null +++ b/app/src/main/res/layout-sw600dp-port/f_setup_success.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".providersetup.fragments.ProviderSelectionFragment"> + + <androidx.constraintlayout.widget.Guideline + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:id="@+id/top_button_guideline" + app:layout_constraintGuide_percent="0.6" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_vertical_left" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.3" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_vertical_right" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.7" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/bottom_button_guideline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="82dp" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="@dimen/stdpadding" + android:layout_margin="@dimen/activity_margin" + app:layout_constraintTop_toTopOf="parent" + > + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:text="@string/title_setup_success" + android:paddingBottom="@dimen/stdpadding" + /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_setup_success_description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_constraintTop_toBottomOf="@id/tv_title" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + android:text="@string/setup_success_description"/> + </LinearLayout> + + <se.leap.bitmaskclient.base.views.MainButton + android:id="@+id/main_button" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_margin="@dimen/mainbutton_padding" + app:layout_constraintTop_toBottomOf="@id/top_button_guideline" + app:layout_constraintBottom_toTopOf="@id/bottom_button_guideline" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right" + app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left" + /> + +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout-xlarge-port/f_setup_success.xml b/app/src/main/res/layout-xlarge-port/f_setup_success.xml new file mode 100644 index 00000000..f92ef4db --- /dev/null +++ b/app/src/main/res/layout-xlarge-port/f_setup_success.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".providersetup.fragments.ProviderSelectionFragment"> + + <androidx.constraintlayout.widget.Guideline + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:id="@+id/top_button_guideline" + app:layout_constraintGuide_percent="0.65" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_vertical_left" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.3" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_vertical_right" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.7" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/bottom_button_guideline" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="horizontal" + app:layout_constraintGuide_percent="0.875" + /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="@dimen/stdpadding" + android:layout_margin="@dimen/activity_margin" + app:layout_constraintTop_toTopOf="parent" + > + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:text="@string/title_setup_success" + android:paddingBottom="@dimen/stdpadding" + /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_setup_success_description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_constraintTop_toBottomOf="@id/tv_title" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + android:text="@string/setup_success_description"/> + </LinearLayout> + + <se.leap.bitmaskclient.base.views.MainButton + android:id="@+id/main_button" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_margin="@dimen/mainbutton_padding" + app:layout_constraintTop_toBottomOf="@id/top_button_guideline" + app:layout_constraintBottom_toTopOf="@id/bottom_button_guideline" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right" + app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left" + /> + +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/f_setup_success.xml b/app/src/main/res/layout-xlarge/f_setup_success.xml new file mode 100644 index 00000000..9a336a92 --- /dev/null +++ b/app/src/main/res/layout-xlarge/f_setup_success.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> + + +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".providersetup.fragments.ProviderSelectionFragment"> + + <androidx.constraintlayout.widget.Guideline + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:id="@+id/top_button_guideline" + app:layout_constraintGuide_percent="0.6" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_vertical_left" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.3" + /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_vertical_right" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.7" + /> + + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/bottom_button_guideline" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="horizontal" + app:layout_constraintGuide_percent="0.875" + /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="@dimen/stdpadding" + android:layout_margin="@dimen/activity_margin" + app:layout_constraintTop_toTopOf="parent" + > + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:text="@string/title_setup_success" + android:paddingBottom="@dimen/stdpadding" + /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_setup_success_description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_constraintTop_toBottomOf="@id/tv_title" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + android:text="@string/setup_success_description"/> + </LinearLayout> + + <se.leap.bitmaskclient.base.views.MainButton + android:id="@+id/main_button" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintTop_toBottomOf="@id/top_button_guideline" + app:layout_constraintBottom_toTopOf="@id/bottom_button_guideline" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right" + app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left" + /> + +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/f_setup_success.xml b/app/src/main/res/layout/f_setup_success.xml index f48d3487..94d3c24d 100644 --- a/app/src/main/res/layout/f_setup_success.xml +++ b/app/src/main/res/layout/f_setup_success.xml @@ -6,16 +6,14 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:padding="@dimen/stdpadding" - android:layout_margin="@dimen/activity_margin" tools:context=".providersetup.fragments.ProviderSelectionFragment"> <androidx.constraintlayout.widget.Guideline + android:id="@+id/top_button_guideline" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - android:id="@+id/top_button_guideline" - app:layout_constraintGuide_percent="0.6" + app:layout_constraintGuide_percent="0.5" /> <androidx.constraintlayout.widget.Guideline @@ -36,33 +34,44 @@ <androidx.constraintlayout.widget.Guideline android:id="@+id/bottom_button_guideline" - android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_width="0dp" + android:layout_height="0dp" android:orientation="horizontal" - app:layout_constraintGuide_end="72dp" /> + app:layout_constraintGuide_percent="0.8" + /> - <androidx.appcompat.widget.AppCompatTextView - android:id="@+id/tv_title" + + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:textAppearance="@style/TextAppearance.AppCompat.Title" - android:text="@string/title_setup_success" - android:paddingBottom="@dimen/stdpadding" + android:orientation="vertical" + android:padding="@dimen/stdpadding" + android:layout_margin="@dimen/activity_margin" app:layout_constraintTop_toTopOf="parent" - /> - <androidx.appcompat.widget.AppCompatTextView - android:id="@+id/tv_setup_success_description" - android:layout_width="match_parent" - android:layout_height="wrap_content" - app:layout_constraintTop_toBottomOf="@id/tv_title" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" - android:text="@string/setup_success_description"/> + > + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:text="@string/title_setup_success" + android:paddingBottom="@dimen/stdpadding" + /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/tv_setup_success_description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_constraintTop_toBottomOf="@id/tv_title" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + android:text="@string/setup_success_description"/> + </LinearLayout> <se.leap.bitmaskclient.base.views.MainButton android:id="@+id/main_button" android:layout_width="0dp" android:layout_height="0dp" - android:layout_margin="@dimen/mainbutton_padding" app:layout_constraintTop_toBottomOf="@id/top_button_guideline" app:layout_constraintBottom_toTopOf="@id/bottom_button_guideline" app:layout_constraintDimensionRatio="1:1" |