Add footer stubs to blank template

am: af3208e2c3

Change-Id: I842e4f437f318771a1099ad24bea74b6e5f86097
This commit is contained in:
Maurice Lam 2017-05-09 00:35:35 +00:00 committed by android-build-merger
commit eaea02f277
4 changed files with 56 additions and 6 deletions

View file

@ -31,11 +31,14 @@
android:visibility="invisible" />
<com.android.setupwizardlib.view.IntrinsicSizeFrameLayout
android:id="@+id/suw_layout_content"
style="@style/SuwGlifCardContainer"
android:layout_width="@dimen/suw_glif_card_width"
android:layout_height="wrap_content"
android:height="@dimen/suw_glif_card_height" />
android:height="@dimen/suw_glif_card_height">
<include layout="@layout/suw_glif_blank_template_content" />
</com.android.setupwizardlib.view.IntrinsicSizeFrameLayout>
<View
android:layout_width="0dp"

View file

@ -21,9 +21,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/suw_layout_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include layout="@layout/suw_glif_blank_template_content" />
</com.android.setupwizardlib.view.StatusBarBackgroundLayout>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/suw_layout_content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<ViewStub
android:id="@+id/suw_layout_footer"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

View file

@ -240,6 +240,21 @@ public class GlifLayoutTest {
testInflateFooter();
}
@Test
public void testInflateFooterBlankTemplate() {
GlifLayout layout = new GlifLayout(mContext, R.layout.suw_glif_blank_template);
final View view = layout.inflateFooter(android.R.layout.simple_list_item_1);
assertEquals(android.R.id.text1, view.getId());
assertNotNull(layout.findViewById(android.R.id.text1));
}
@Config(qualifiers = "sw600dp")
@Test
public void testInflateFooterBlankTemplateTablet() {
testInflateFooterBlankTemplate();
}
@Test
public void testFooterXml() {
GlifLayout layout = new GlifLayout(