OLD | NEW |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <!-- Copyright 2014 The Chromium Authors. All rights reserved. | 2 <!-- Copyright 2014 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <org.chromium.chrome.browser.banners.AppBannerView | 7 <org.chromium.chrome.browser.banners.AppBannerView |
8 xmlns:android="http://schemas.android.com/apk/res/android" | 8 xmlns:android="http://schemas.android.com/apk/res/android" |
9 android:id="@+id/app_banner_view" | 9 android:id="@+id/app_banner_view" |
10 android:background="@drawable/card_background_default" | 10 android:background="@drawable/card_background_default" |
11 android:layout_width="match_parent" | 11 android:layout_width="match_parent" |
12 android:layout_height="wrap_content"> | 12 android:layout_height="wrap_content"> |
13 <!-- View showing the icon. --> | |
13 <ImageView | 14 <ImageView |
14 android:id="@+id/app_icon" | 15 android:id="@+id/app_icon" |
15 android:adjustViewBounds="true" | 16 android:adjustViewBounds="true" |
16 android:layout_width="wrap_content" | 17 android:layout_width="wrap_content" |
17 android:layout_height="@dimen/app_banner_icon_size" | 18 android:layout_height="@dimen/app_banner_icon_size" |
18 android:layout_marginEnd="@dimen/app_banner_icon_margin_end" /> | 19 android:layout_marginEnd="@dimen/app_banner_icon_margin_end" /> |
20 | |
21 <!-- View showing the app's title. --> | |
19 <TextView | 22 <TextView |
20 android:id="@+id/app_title" | 23 android:id="@+id/app_title" |
21 android:textAppearance="@style/AppBannerTitle" | 24 android:textAppearance="@style/AppBannerTitle" |
22 android:includeFontPadding="false" | 25 android:includeFontPadding="false" |
23 android:minLines="1" | 26 android:lines="1" |
24 android:maxLines="1" | |
25 android:ellipsize="end" | 27 android:ellipsize="end" |
26 android:layout_width="wrap_content" | 28 android:layout_width="wrap_content" |
27 android:layout_height="wrap_content" | 29 android:layout_height="wrap_content" |
28 android:layout_marginTop="@dimen/app_banner_title_margin_top" | 30 android:layout_marginTop="@dimen/app_banner_title_margin_top" |
29 android:layout_marginBottom="@dimen/app_banner_title_margin_bottom" /> | 31 android:layout_marginBottom="@dimen/app_banner_title_margin_bottom" /> |
32 | |
33 <!-- Button that triggers installation and opening of the app. --> | |
30 <Button | 34 <Button |
31 android:id="@+id/app_install_button" | 35 android:id="@+id/app_install_button" |
32 android:background="@color/app_banner_install_button_bg" | 36 android:background="@drawable/app_banner_button_install" |
33 android:minHeight="@dimen/app_banner_button_height" | 37 android:minHeight="@dimen/app_banner_button_height" |
38 android:lines="1" | |
34 android:textAppearance="@style/AppBannerButton" | 39 android:textAppearance="@style/AppBannerButton" |
35 android:paddingStart="@dimen/app_banner_button_padding_sides" | 40 android:paddingStart="@dimen/app_banner_button_padding_sides" |
36 android:paddingEnd="@dimen/app_banner_button_padding_sides" | 41 android:paddingEnd="@dimen/app_banner_button_padding_sides" |
37 android:paddingTop="@dimen/app_banner_button_padding_above_below" | 42 android:paddingTop="@dimen/app_banner_button_padding_above_below" |
38 android:paddingBottom="@dimen/app_banner_button_padding_above_below" | 43 android:paddingBottom="@dimen/app_banner_button_padding_above_below" |
39 android:layout_width="wrap_content" | 44 android:layout_width="wrap_content" |
40 android:layout_height="wrap_content" | 45 android:layout_height="wrap_content" |
41 android:layout_marginTop="@dimen/app_banner_button_margin_top" | 46 android:layout_marginTop="@dimen/app_banner_button_margin_top" |
42 android:layout_marginStart="@dimen/app_banner_button_margin_start" / > | 47 android:layout_marginStart="@dimen/app_banner_button_margin_start" / > |
48 | |
49 <!-- Logo for the store. --> | |
43 <ImageView | 50 <ImageView |
44 android:id="@+id/store_logo" | 51 android:id="@+id/store_logo" |
45 android:src="@drawable/google_play_logo" | 52 android:src="@drawable/google_play_logo" |
46 android:adjustViewBounds="true" | 53 android:adjustViewBounds="true" |
47 android:layout_width="wrap_content" | 54 android:layout_width="wrap_content" |
48 android:layout_height="@dimen/app_banner_logo_height" | 55 android:layout_height="@dimen/app_banner_logo_height" |
56 android:layout_marginTop="@dimen/app_banner_logo_margin_top" | |
49 android:layout_marginBottom="@dimen/app_banner_logo_margin_bottom" / > | 57 android:layout_marginBottom="@dimen/app_banner_logo_margin_bottom" / > |
58 | |
59 <!-- View showing how well the app is rated. --> | |
50 <org.chromium.chrome.browser.banners.RatingView | 60 <org.chromium.chrome.browser.banners.RatingView |
51 android:id="@+id/app_rating" | 61 android:id="@+id/app_rating" |
52 android:adjustViewBounds="true" | 62 android:adjustViewBounds="true" |
53 android:layout_width="wrap_content" | 63 android:layout_width="wrap_content" |
54 android:layout_height="@dimen/app_banner_star_height" /> | 64 android:layout_height="@dimen/app_banner_star_height" /> |
65 | |
66 <!-- View covering the entire banner. Used to indicate the banner is highli ghted. --> | |
67 <View | |
Ted C
2014/02/25 21:17:36
Instead of this view, can you use android:foregrou
gone
2014/02/25 22:30:14
Has the unfortunate side effect of highlighting ev
| |
68 android:id="@+id/banner_highlight" | |
69 android:background="@color/app_banner_card_highlight" | |
70 android:visibility="gone" | |
71 android:layout_width="match_parent" | |
72 android:layout_height="match_parent" /> | |
55 </org.chromium.chrome.browser.banners.AppBannerView> | 73 </org.chromium.chrome.browser.banners.AppBannerView> |
OLD | NEW |