1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!--
3+ Copyright (C) 2015 The Android Open Source Project
4+
5+ Licensed under the Apache License, Version 2.0 (the "License");
6+ you may not use this file except in compliance with the License.
7+ You may obtain a copy of the License at
8+
9+ http://www.apache.org/licenses/LICENSE-2.0
10+
11+ Unless required by applicable law or agreed to in writing, software
12+ distributed under the License is distributed on an "AS IS" BASIS,
13+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ See the License for the specific language governing permissions and
15+ limitations under the License.
16+ -->
17+ <!-- RelativeLayout is a nice choice when we're playing with elevations because it allows us to
18+ flexibly place layouts all in the same drawing layer -->
19+ <RelativeLayout xmlns : android =" http://schemas.android.com/apk/res/android"
20+ xmlns : app =" http://schemas.android.com/apk/res-auto"
21+ xmlns : tools =" http://schemas.android.com/tools"
22+ android : layout_width =" match_parent"
23+ android : layout_height =" match_parent" >
24+
25+ <android .support.v7.widget.Toolbar
26+ android : id =" @+id/toolbar"
27+ android : layout_height =" ?attr/actionBarSize"
28+ android : layout_width =" match_parent"
29+ android : elevation =" @dimen/appbar_elevation"
30+ android : layout_alignParentTop =" true"
31+ app : theme =" @style/ThemeOverlay.AppCompat.Dark.ActionBar"
32+ app : popupTheme =" @style/ThemeOverlay.AppCompat.Light" />
33+
34+ <ImageView
35+ android : id =" @+id/sunshine_logo_imageview"
36+ android : layout_width =" match_parent"
37+ android : layout_height =" ?attr/listPreferredItemHeight"
38+ android : layout_below =" @+id/toolbar"
39+ android : scaleType =" center"
40+ android : src =" @drawable/ic_logo"
41+ android : elevation =" @dimen/appbar_elevation"
42+ android : background =" @color/primary"
43+ android : contentDescription =" @string/app_name" />
44+
45+ <!-- This view is used to provide the area that is overlapped
46+ as well as the anchor point that the weather detail will
47+ use to overlap the "appbar" -->
48+ <View
49+ android : elevation =" @dimen/appbar_elevation"
50+ android : background =" @color/primary"
51+ android : layout_below =" @id/sunshine_logo_imageview"
52+ android : layout_width =" match_parent"
53+ android : layout_height =" @dimen/details_app_bar_overlap" />
54+
55+ <FrameLayout
56+ android : id =" @+id/weather_detail_container"
57+ android : layout_height =" wrap_content"
58+ android : layout_width =" match_parent"
59+ android : elevation =" @dimen/appbar_elevation"
60+ android : layout_below =" @id/sunshine_logo_imageview"
61+ android : paddingLeft =" @dimen/abc_list_item_padding_horizontal_material"
62+ android : paddingRight =" @dimen/abc_list_item_padding_horizontal_material"
63+ />
64+
65+ <fragment
66+ android : id =" @+id/fragment_forecast"
67+ android : name =" com.example.android.sunshine.app.ForecastFragment"
68+ android : layout_height =" match_parent"
69+ android : layout_width =" match_parent"
70+ android : layout_below =" @id/weather_detail_container"
71+ tools : layout =" @android:layout/list_content"
72+ />
73+ </RelativeLayout >
0 commit comments