Add footer stubs to blank template
am: af3208e2c3
Change-Id: I842e4f437f318771a1099ad24bea74b6e5f86097
This commit is contained in:
commit
eaea02f277
|
@ -31,11 +31,14 @@
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible" />
|
||||||
|
|
||||||
<com.android.setupwizardlib.view.IntrinsicSizeFrameLayout
|
<com.android.setupwizardlib.view.IntrinsicSizeFrameLayout
|
||||||
android:id="@+id/suw_layout_content"
|
|
||||||
style="@style/SuwGlifCardContainer"
|
style="@style/SuwGlifCardContainer"
|
||||||
android:layout_width="@dimen/suw_glif_card_width"
|
android:layout_width="@dimen/suw_glif_card_width"
|
||||||
android:layout_height="wrap_content"
|
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
|
<View
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
@ -21,9 +21,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<FrameLayout
|
<include layout="@layout/suw_glif_blank_template_content" />
|
||||||
android:id="@+id/suw_layout_content"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
</com.android.setupwizardlib.view.StatusBarBackgroundLayout>
|
</com.android.setupwizardlib.view.StatusBarBackgroundLayout>
|
||||||
|
|
35
library/main/res/layout/suw_glif_blank_template_content.xml
Normal file
35
library/main/res/layout/suw_glif_blank_template_content.xml
Normal 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>
|
|
@ -240,6 +240,21 @@ public class GlifLayoutTest {
|
||||||
testInflateFooter();
|
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
|
@Test
|
||||||
public void testFooterXml() {
|
public void testFooterXml() {
|
||||||
GlifLayout layout = new GlifLayout(
|
GlifLayout layout = new GlifLayout(
|
||||||
|
|
Loading…
Reference in a new issue