summaryrefslogtreecommitdiffhomepage
path: root/android/app/src
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-01-25 16:06:00 +0100
committerAlbin <albin@mullvad.net>2023-01-26 10:04:25 +0100
commit338239a6593241cf609ea5ee0a6d319fe8c34e53 (patch)
tree7574c9b7dcbfb286439dcd88ec1ca14d20caaa04 /android/app/src
parentb7c85da618e0966c857e63ceb22aa76076f7112e (diff)
downloadmullvadvpn-338239a6593241cf609ea5ee0a6d319fe8c34e53.tar.xz
mullvadvpn-338239a6593241cf609ea5ee0a6d319fe8c34e53.zip
Restructure top bar using constraint layout
Diffstat (limited to 'android/app/src')
-rw-r--r--android/app/src/main/res/layout/header_bar.xml59
1 files changed, 35 insertions, 24 deletions
diff --git a/android/app/src/main/res/layout/header_bar.xml b/android/app/src/main/res/layout/header_bar.xml
index a5965596a3..ee790655bb 100644
--- a/android/app/src/main/res/layout/header_bar.xml
+++ b/android/app/src/main/res/layout/header_bar.xml
@@ -1,25 +1,36 @@
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <ImageView android:layout_width="44dp"
- android:layout_height="44dp"
- android:layout_marginLeft="16dp"
- android:layout_marginVertical="12dp"
- android:layout_weight="0"
- android:src="@drawable/logo_icon" />
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginHorizontal="9dp"
- android:layout_marginVertical="12dp"
- android:layout_weight="1"
- android:textColor="@color/white80"
- android:textSize="@dimen/text_big"
- android:textStyle="bold"
- android:text="@string/app_name"
- android:textAllCaps="true" />
- <ImageButton android:id="@+id/settings"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="0"
- android:paddingHorizontal="16dp"
- android:background="?android:attr/selectableItemBackground"
- android:src="@drawable/icon_settings" />
+<merge xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+ <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent"
+ android:layout_height="@dimen/top_bar_height">
+
+ <ImageView android:id="@+id/appIcon"
+ android:layout_width="44dp"
+ android:layout_height="44dp"
+ android:src="@drawable/logo_icon"
+ android:layout_marginStart="16dp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent" />
+ <TextView android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginHorizontal="9dp"
+ android:layout_marginVertical="12dp"
+ android:textColor="@color/white80"
+ android:textSize="@dimen/text_big"
+ android:textStyle="bold"
+ android:text="@string/app_name"
+ android:textAllCaps="true"
+ app:layout_constraintStart_toEndOf="@id/appIcon"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent" />
+ <ImageButton android:id="@+id/settings"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="?android:attr/selectableItemBackground"
+ android:paddingHorizontal="16dp"
+ android:src="@drawable/icon_settings"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent" />
+ </androidx.constraintlayout.widget.ConstraintLayout>
</merge>