diff options
author | Torsten Grote <t@grobox.de> | 2020-03-06 10:59:13 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-03-06 10:59:13 -0300 |
commit | 826c0167e37d25c2437d67d1d893586e9b9dadd5 (patch) | |
tree | c883dbca8aefb2a4880e44e09e0e01f64b121cdc /app/src/main/res | |
parent | 09b66e71b0fa0fd24ad3c4196ff545faaad6da14 (diff) | |
download | wallet-android-826c0167e37d25c2437d67d1d893586e9b9dadd5.tar.gz wallet-android-826c0167e37d25c2437d67d1d893586e9b9dadd5.tar.bz2 wallet-android-826c0167e37d25c2437d67d1d893586e9b9dadd5.zip |
Show version name and code in navigation drawer when dev mode is on
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/activity_main.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/nav_header_main.xml | 55 |
2 files changed, 39 insertions, 18 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7769fd3..0612306 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -33,7 +33,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" - android:fitsSystemWindows="true" + android:fitsSystemWindows="false" app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer" /> diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml index f21d6a3..5574c1f 100644 --- a/app/src/main/res/layout/nav_header_main.xml +++ b/app/src/main/res/layout/nav_header_main.xml @@ -14,39 +14,60 @@ ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="@dimen/nav_header_height" + android:layout_height="wrap_content" android:background="@drawable/side_nav_bar" - android:gravity="bottom" - android:orientation="vertical" - android:paddingLeft="@dimen/activity_horizontal_margin" - android:paddingTop="@dimen/activity_vertical_margin" - android:paddingRight="@dimen/activity_horizontal_margin" - android:paddingBottom="@dimen/activity_vertical_margin" android:theme="@style/ThemeOverlay.AppCompat.Dark"> <ImageView - android:id="@+id/imageView" + android:id="@+id/talerLogoView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:adjustViewBounds="false" + android:layout_margin="16dp" android:contentDescription="@string/nav_header_desc" - android:paddingTop="@dimen/nav_header_vertical_spacing" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" app:srcCompat="@mipmap/ic_launcher_round" /> <TextView - android:layout_width="match_parent" + android:id="@+id/gnuView" + android:layout_width="0dp" android:layout_height="wrap_content" - android:paddingTop="@dimen/nav_header_vertical_spacing" + android:layout_marginStart="16dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="16dp" android:text="@string/nav_header_title" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/talerLogoView" /> <TextView - android:id="@+id/textView" + android:id="@+id/walletView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/nav_header_subtitle" /> + android:layout_marginStart="16dp" + android:layout_marginTop="4dp" + android:layout_marginBottom="16dp" + android:text="@string/nav_header_subtitle" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/gnuView" /> -</LinearLayout> + <TextView + android:id="@+id/versionView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:layout_marginEnd="16dp" + app:layout_constraintBottom_toBottomOf="@+id/walletView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toEndOf="@+id/walletView" + app:layout_constraintTop_toTopOf="@+id/walletView" + tools:text="0.6.9-pre15" /> + +</androidx.constraintlayout.widget.ConstraintLayout> |