1313 See the License for the specific language governing permissions and
1414 limitations under the License.
1515 -->
16- <RelativeLayout xmlns : android =" http://schemas.android.com/apk/res/android"
16+ <RelativeLayout
17+ xmlns : android =" http://schemas.android.com/apk/res/android"
1718 xmlns : app =" http://schemas.android.com/apk/res-auto"
1819 xmlns : tools =" http://schemas.android.com/tools"
1920 android : layout_width =" match_parent"
2021 android : layout_height =" match_parent" >
2122
22- <LinearLayout
23+ <RelativeLayout
2324 android : id =" @+id/appbar"
2425 android : layout_width =" match_parent"
2526 android : layout_height =" wrap_content"
3233 android : id =" @+id/toolbar"
3334 android : layout_width =" match_parent"
3435 android : layout_height =" ?attr/actionBarSize"
36+ android : layout_alignParentTop =" true"
37+ android : layout_alignParentLeft =" true"
38+
3539 app : theme =" @style/ThemeOverlay.AppCompat.Dark.ActionBar" />
3640
37- <!-- These FrameLayouts are only there to line the image up with the keyline correctly, since
38- we cannot do addition of dimensions/attributes otherwise -->
39- <FrameLayout
40- android : layout_width =" wrap_content"
41- android : layout_height =" wrap_content"
41+ <!-- This Space is only there to line the image up with the
42+ keyline correctly, since we cannot do addition of
43+ dimensions/attributes otherwise -->
44+ <android .support.v4.widget.Space
45+ android : id =" @+id/sunshineLogoAlign"
46+ android : layout_width =" @dimen/list_icon"
47+ android : layout_height =" 0dp"
4248 android : layout_marginLeft =" @dimen/abc_list_item_padding_horizontal_material"
4349 android : layout_marginStart =" @dimen/abc_list_item_padding_horizontal_material"
44- >
45- <FrameLayout
46- android : layout_width =" wrap_content"
47- android : layout_height =" wrap_content"
48- android : layout_marginLeft =" @dimen/list_icon"
49- android : layout_marginStart =" @dimen/list_icon"
50- android : paddingLeft =" @dimen/abc_list_item_padding_horizontal_material"
51- android : paddingStart =" @dimen/abc_list_item_padding_horizontal_material" >
50+ android : layout_alignParentLeft =" true"
51+ android : layout_below =" @id/toolbar" />
5252
53- <ImageView
54- android : layout_width =" wrap_content"
55- android : layout_height =" ?attr/listPreferredItemHeight"
56- android : layout_gravity =" center_vertical"
57- android : src =" @drawable/ic_logo"
58- android : contentDescription =" @string/app_name" />
59- </FrameLayout >
60- </FrameLayout >
61- </LinearLayout >
53+ <ImageView
54+ android : layout_width =" wrap_content"
55+ android : layout_height =" ?attr/listPreferredItemHeight"
56+ android : layout_gravity =" center_vertical"
57+ android : layout_below =" @id/sunshineLogoAlign"
58+ android : layout_marginLeft =" @dimen/abc_list_item_padding_horizontal_material"
59+ android : layout_marginStart =" @dimen/abc_list_item_padding_horizontal_material"
60+ android : layout_toRightOf =" @id/sunshineLogoAlign"
61+ android : src =" @drawable/ic_logo"
62+ android : contentDescription =" @string/app_name" />
63+ </RelativeLayout >
6264
6365 <!-- This is used as a strut to create two columns in our RelativeLayout -->
6466 <android .support.v4.widget.Space
7981 android : layout_below =" @id/appbar"
8082 tools : layout =" @android:layout/list_content" />
8183
82- <!-- We set elevation here only so the detail view doesn't get occluded
83- by the AppBar -->
84-
85- <FrameLayout
86- android : id =" @+id/weather_detail_container "
84+ <!-- This is used to give the card the appropriate margin
85+ list_item_extra_padding +
86+ abc_list_item_padding_horizontal_material -->
87+ <android .support.v7.widget.Space
88+ android : id =" @+id/cardviewAligner "
8789 android : layout_width =" match_parent"
8890 android : layout_height =" match_parent"
8991 android : layout_alignLeft =" @id/layout_center"
9496 android : elevation =" @dimen/appbar_elevation"
9597 android : layout_marginRight =" @dimen/list_item_extra_padding"
9698 android : layout_marginEnd =" @dimen/list_item_extra_padding"
97- android : paddingRight =" @dimen/abc_list_item_padding_horizontal_material"
98- android : paddingEnd =" @dimen/abc_list_item_padding_horizontal_material"
99- android : paddingBottom =" @dimen/detail_container_bottom_margin"
10099 />
100+ <android .support.v7.widget.CardView
101+ android : id =" @+id/weather_detail_container"
102+ android : layout_width =" match_parent"
103+ android : layout_height =" match_parent"
104+ android : layout_alignLeft =" @id/cardviewAligner"
105+ android : layout_alignRight =" @id/cardviewAligner"
106+ android : layout_alignTop =" @id/cardviewAligner"
107+ android : layout_alignBottom =" @id/cardviewAligner"
108+ android : layout_marginRight =" @dimen/abc_list_item_padding_horizontal_material"
109+ android : layout_marginEnd =" @dimen/abc_list_item_padding_horizontal_material"
110+ android : layout_marginBottom =" @dimen/detail_container_bottom_margin"
111+ app : cardElevation =" @dimen/detail_card_elevation"
112+ app : cardPreventCornerOverlap =" false"
113+ />
101114
102115</RelativeLayout >
0 commit comments