Merge "[SuwLib] Implement tablet layouts"

This commit is contained in:
Maurice Lam 2015-12-03 01:46:44 +00:00 committed by Android (Google) Code Review
commit 678740df07
14 changed files with 136 additions and 2 deletions

View file

@ -115,6 +115,12 @@
<item name="android:textColor">@android:color/white</item>
</style>
<!-- GLIF Card layout (for tablets) -->
<style name="SuwGlifCardBackground">
<item name="android:background">?attr/colorPrimary</item>
</style>
<!-- Navigation bar styles -->
<style name="SuwNavBarButtonStyle" parent="@android:style/Widget.Button">

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2015 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.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/SuwGlifCardBackground"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
style="@style/SuwGlifCardContainer"
android:layout_width="@dimen/suw_glif_card_width"
android:layout_height="@dimen/suw_glif_card_height"
android:layout_centerInParent="true">
<include layout="@layout/suw_glif_recycler_template_content" />
</FrameLayout>
</RelativeLayout>

View file

@ -20,5 +20,7 @@
<item name="suw_recycler_template" type="layout">@layout/suw_recycler_template_card</item>
<item name="suw_recycler_template_short" type="layout">@layout/suw_recycler_template_card</item>
<item name="suw_glif_recycler_template" type="layout">@layout/suw_glif_recycler_template_card</item>
</resources>

View file

@ -20,5 +20,7 @@
<item name="suw_recycler_template" type="layout">@layout/suw_recycler_template_header</item>
<item name="suw_recycler_template_short" type="layout">@layout/suw_recycler_template_header_collapsed</item>
<item name="suw_glif_recycler_template" type="layout">@layout/suw_glif_recycler_template_content</item>
</resources>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2015 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.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/SuwGlifCardBackground"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
style="@style/SuwGlifCardContainer"
android:layout_width="@dimen/suw_glif_card_width"
android:layout_height="@dimen/suw_glif_card_height"
android:layout_centerInParent="true">
<include layout="@layout/suw_glif_list_template_content" />
</FrameLayout>
</RelativeLayout>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2015 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.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/SuwGlifCardBackground"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
style="@style/SuwGlifCardContainer"
android:layout_width="@dimen/suw_glif_card_width"
android:layout_height="@dimen/suw_glif_card_height"
android:layout_centerInParent="true">
<include layout="@layout/suw_glif_template_content" />
</FrameLayout>
</RelativeLayout>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
@ -24,5 +24,8 @@
<item name="suw_no_scroll_template" type="layout">@layout/suw_no_scroll_template_card</item>
<item name="suw_no_scroll_template_short" type="layout">@layout/suw_no_scroll_template_card</item>
<item name="suw_glif_template" type="layout">@layout/suw_glif_template_card</item>
<item name="suw_glif_list_template" type="layout">@layout/suw_glif_list_template_card</item>
</resources>

View file

@ -61,6 +61,11 @@
<!-- Decor view (illustration or the header without illustration) -->
<dimen name="suw_decor_padding_top">0dp</dimen>
<!-- GLIF card layout (for tablets) -->
<dimen name="suw_glif_card_elevation">5dp</dimen>
<dimen name="suw_glif_card_width">560dp</dimen>
<dimen name="suw_glif_card_height">672dp</dimen>
<!-- Header layout (for phones) -->
<dimen name="suw_title_area_elevation">3dp</dimen>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
@ -24,5 +24,8 @@
<item name="suw_no_scroll_template" type="layout">@layout/suw_no_scroll_template_header</item>
<item name="suw_no_scroll_template_short" type="layout">@layout/suw_no_scroll_template_header_collapsed</item>
<item name="suw_glif_template" type="layout">@layout/suw_glif_template_content</item>
<item name="suw_glif_list_template" type="layout">@layout/suw_glif_list_template_content</item>
</resources>

View file

@ -94,6 +94,13 @@
<style name="SuwCardTitle" parent="SuwBaseCardTitle" />
<!-- GLIF Card layout (for tablets) -->
<style name="SuwGlifCardContainer">
<item name="android:background">?android:attr/colorBackground</item>
<item name="android:elevation" tools:ignore="NewApi">5dp</item>
</style>
<!-- Header layout (for phones) -->
<style name="SuwBaseHeaderTitle">

View file

@ -87,6 +87,12 @@
<item name="suwMarginSides">@dimen/suw_glif_margin_sides</item>
</style>
<!-- GLIF Card layout (for tablets) -->
<style name="SuwGlifCardBackground">
<item name="android:background">?android:attr/colorPrimary</item>
</style>
<!-- Items styles -->
<style name="SuwItemContainer">