Replace TitleBar sub views with a ViewStub.
Optimise startup performance by using a ViewStub for TitleBar views
that aren't needed until later.
Bug: 5179151
Change-Id: I87cf23cbd1e3b818a566c95dc6bb9cc1ff366587
diff --git a/res/layout/title_bar.xml b/res/layout/title_bar.xml
index cf500c8..acc49e6 100644
--- a/res/layout/title_bar.xml
+++ b/res/layout/title_bar.xml
@@ -24,14 +24,14 @@
android:id="@+id/taburlbar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height" />
- <include
- layout="@layout/title_bar_snapshot"
- android:id="@+id/snapshotbar"
+ <ViewStub
+ android:id="@+id/snapshotbar_stub"
+ android:layout="@layout/title_bar_snapshot"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height" />
- <include
- layout="@layout/title_bar_autologin"
- android:id="@+id/autologin"
+ <ViewStub
+ android:id="@+id/autologin_stub"
+ android:layout="@layout/title_bar_autologin"
android:paddingTop="3dip"
android:layout_below="@id/taburlbar"
android:layout_width="match_parent"