From: Damyan Ivanov Date: Sun, 3 May 2020 12:55:09 +0000 (+0300) Subject: add a copy of the navigation drawer header to the welcome screen X-Git-Tag: v0.12.0~14 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=a5a04fc34d4c885730ecf7a11f77b16055f3491e;p=mobile-ledger.git add a copy of the navigation drawer header to the welcome screen --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 64d32be4..21ed5588 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -185,12 +185,14 @@ public class MainActivity extends ProfileThemedActivity { } barDrawerToggle.syncState(); - TextView ver = drawer.findViewById(R.id.drawer_version_text); try { PackageInfo pi = getApplicationContext().getPackageManager() .getPackageInfo(getPackageName(), 0); - ver.setText(pi.versionName); + ((TextView) findViewById(R.id.nav_upper).findViewById( + R.id.drawer_version_text)).setText(pi.versionName); + ((TextView) findViewById(R.id.no_profiles_layout).findViewById( + R.id.drawer_version_text)).setText(pi.versionName); } catch (Exception e) { e.printStackTrace(); diff --git a/app/src/main/res/layout/main_navigation.xml b/app/src/main/res/layout/main_navigation.xml index 8de14e2e..fb30743c 100644 --- a/app/src/main/res/layout/main_navigation.xml +++ b/app/src/main/res/layout/main_navigation.xml @@ -74,42 +74,7 @@ app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items" app:layout_constraintTop_toBottomOf="@+id/nav_header"> - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/no_profiles.xml b/app/src/main/res/layout/no_profiles.xml index f3a4d4d6..a072d151 100644 --- a/app/src/main/res/layout/no_profiles.xml +++ b/app/src/main/res/layout/no_profiles.xml @@ -18,51 +18,71 @@ + android:visibility="gone"> - + app:layout_constraintTop_toTopOf="parent"> - + + -