Merge "[SuwLib] Implement tablet layouts"
This commit is contained in:
commit
678740df07
|
@ -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">
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
33
library/main/res/layout/suw_glif_list_template_card.xml
Normal file
33
library/main/res/layout/suw_glif_list_template_card.xml
Normal 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>
|
34
library/main/res/layout/suw_glif_template_card.xml
Normal file
34
library/main/res/layout/suw_glif_template_card.xml
Normal 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>
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue