| 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:clickable="true" | 11 android:clickable="true" |
| 12 android:focusableInTouchMode="true" | 12 android:focusableInTouchMode="true" |
| 13 android:layout_width="match_parent" | 13 android:layout_width="match_parent" |
| 14 android:layout_height="wrap_content"> | 14 android:layout_height="wrap_content"> |
| 15 <!-- View showing the icon. --> | 15 <FrameLayout |
| 16 <ImageView | 16 android:id="@+id/banner_container" |
| 17 android:id="@+id/app_icon" | |
| 18 android:adjustViewBounds="true" | |
| 19 android:layout_width="wrap_content" | |
| 20 android:layout_height="@dimen/app_banner_icon_size" | |
| 21 android:layout_marginEnd="@dimen/app_banner_icon_margin_end" /> | |
| 22 | |
| 23 <!-- View showing the app's title. --> | |
| 24 <TextView | |
| 25 android:id="@+id/app_title" | |
| 26 android:textAppearance="@style/AppBannerTitle" | |
| 27 android:includeFontPadding="false" | |
| 28 android:lines="1" | |
| 29 android:ellipsize="end" | |
| 30 android:layout_width="wrap_content" | |
| 31 android:layout_height="wrap_content" | |
| 32 android:layout_marginTop="@dimen/app_banner_title_margin_top" | |
| 33 android:layout_marginBottom="@dimen/app_banner_title_margin_bottom"
/> | |
| 34 | |
| 35 <!-- Button that triggers installation and opening of the app. --> | |
| 36 <Button | |
| 37 android:id="@+id/app_install_button" | |
| 38 style="@style/AppBannerButton" | |
| 39 android:textColor="@color/app_banner_install_button_fg" | |
| 40 android:ellipsize="end" | |
| 41 android:singleLine="true" | |
| 42 android:minHeight="@dimen/app_banner_button_height" | |
| 43 android:paddingStart="@dimen/app_banner_button_padding_sides" | |
| 44 android:paddingEnd="@dimen/app_banner_button_padding_sides" | |
| 45 android:paddingTop="@dimen/app_banner_button_padding_above_below" | |
| 46 android:paddingBottom="@dimen/app_banner_button_padding_above_below" | |
| 47 android:layout_width="wrap_content" | |
| 48 android:layout_height="wrap_content" | |
| 49 android:layout_marginTop="@dimen/app_banner_button_margin_top" /> | |
| 50 | |
| 51 <!-- Logo for the store. --> | |
| 52 <ImageView | |
| 53 android:id="@+id/store_logo" | |
| 54 android:src="@drawable/google_play_logo" | |
| 55 android:adjustViewBounds="true" | |
| 56 android:layout_width="wrap_content" | |
| 57 android:layout_height="@dimen/app_banner_logo_height" | |
| 58 android:layout_marginTop="@dimen/app_banner_logo_margin_top" | |
| 59 android:layout_marginBottom="@dimen/app_banner_logo_margin_bottom" | |
| 60 android:layout_marginEnd="@dimen/app_banner_logo_margin_end"/> | |
| 61 | |
| 62 <!-- View showing how well the app is rated. --> | |
| 63 <org.chromium.chrome.browser.banners.RatingView | |
| 64 android:id="@+id/app_rating" | |
| 65 android:adjustViewBounds="true" | |
| 66 android:layout_width="wrap_content" | |
| 67 android:layout_height="@dimen/app_banner_star_height" /> | |
| 68 | |
| 69 <!-- Button that closes the banner. --> | |
| 70 <ImageButton | |
| 71 android:id="@+id/close_button" | |
| 72 android:contentDescription="@string/infobar_close" | |
| 73 android:adjustViewBounds="true" | |
| 74 android:src="@drawable/infobar_close_button" | |
| 75 android:background="@drawable/app_banner_button_close" | |
| 76 android:padding="@dimen/app_banner_close_button_padding" | |
| 77 android:layout_width="wrap_content" | |
| 78 android:layout_height="wrap_content"/> | |
| 79 | |
| 80 <!-- View covering the entire banner. Used to indicate the banner is highli
ghted. --> | |
| 81 <View | |
| 82 android:id="@+id/banner_highlight" | |
| 83 android:background="@color/app_banner_card_highlight" | |
| 84 android:visibility="gone" | |
| 85 android:layout_width="match_parent" | 17 android:layout_width="match_parent" |
| 86 android:layout_height="match_parent" /> | 18 android:layout_height="wrap_content"> |
| 19 <!-- View showing the icon. --> |
| 20 <ImageView |
| 21 android:id="@+id/app_icon" |
| 22 android:adjustViewBounds="true" |
| 23 android:layout_width="wrap_content" |
| 24 android:layout_height="@dimen/app_banner_icon_size" |
| 25 android:layout_marginEnd="@dimen/app_banner_icon_margin_end" /> |
| 26 |
| 27 <!-- View showing the app's title. --> |
| 28 <TextView |
| 29 android:id="@+id/app_title" |
| 30 android:textAppearance="@style/AppBannerTitle" |
| 31 android:includeFontPadding="false" |
| 32 android:lines="1" |
| 33 android:ellipsize="end" |
| 34 android:layout_width="wrap_content" |
| 35 android:layout_height="wrap_content" |
| 36 android:layout_marginTop="@dimen/app_banner_title_margin_top" |
| 37 android:layout_marginBottom="@dimen/app_banner_title_margin_bott
om" /> |
| 38 |
| 39 <!-- Button that triggers installation and opening of the app. --> |
| 40 <Button |
| 41 android:id="@+id/app_install_button" |
| 42 style="@style/AppBannerButton" |
| 43 android:textColor="@color/app_banner_install_button_fg" |
| 44 android:ellipsize="end" |
| 45 android:singleLine="true" |
| 46 android:minHeight="@dimen/app_banner_button_height" |
| 47 android:paddingStart="@dimen/app_banner_button_padding_sides" |
| 48 android:paddingEnd="@dimen/app_banner_button_padding_sides" |
| 49 android:paddingTop="@dimen/app_banner_button_padding_above_below
" |
| 50 android:paddingBottom="@dimen/app_banner_button_padding_above_be
low" |
| 51 android:layout_width="wrap_content" |
| 52 android:layout_height="wrap_content" |
| 53 android:layout_marginTop="@dimen/app_banner_button_margin_top" /
> |
| 54 |
| 55 <!-- Logo for the store. --> |
| 56 <ImageView |
| 57 android:id="@+id/store_logo" |
| 58 android:src="@drawable/google_play_logo" |
| 59 android:adjustViewBounds="true" |
| 60 android:layout_width="wrap_content" |
| 61 android:layout_height="@dimen/app_banner_logo_height" |
| 62 android:layout_marginTop="@dimen/app_banner_logo_margin_top" |
| 63 android:layout_marginBottom="@dimen/app_banner_logo_margin_botto
m" |
| 64 android:layout_marginEnd="@dimen/app_banner_logo_margin_end"/> |
| 65 |
| 66 <!-- View showing how well the app is rated. --> |
| 67 <org.chromium.chrome.browser.banners.RatingView |
| 68 android:id="@+id/app_rating" |
| 69 android:adjustViewBounds="true" |
| 70 android:layout_width="wrap_content" |
| 71 android:layout_height="@dimen/app_banner_star_height" /> |
| 72 |
| 73 <!-- Button that closes the banner. --> |
| 74 <ImageButton |
| 75 android:id="@+id/close_button" |
| 76 android:contentDescription="@string/infobar_close" |
| 77 android:adjustViewBounds="true" |
| 78 android:src="@drawable/infobar_close_button" |
| 79 android:background="@drawable/app_banner_button_close" |
| 80 android:padding="@dimen/app_banner_close_button_padding" |
| 81 android:layout_width="wrap_content" |
| 82 android:layout_height="wrap_content"/> |
| 83 |
| 84 <!-- View covering the entire banner. Used to indicate the banner is hi
ghlighted. --> |
| 85 <View |
| 86 android:id="@+id/banner_highlight" |
| 87 android:background="@color/app_banner_card_highlight" |
| 88 android:visibility="gone" |
| 89 android:layout_width="match_parent" |
| 90 android:layout_height="match_parent" /> |
| 91 </FrameLayout> |
| 87 </org.chromium.chrome.browser.banners.AppBannerView> | 92 </org.chromium.chrome.browser.banners.AppBannerView> |
| OLD | NEW |