Commit 23d77d1a authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

[Home] Use separate toolbar shadow for Chrome Modern

Other varieties of the toobar depend on the shadow drawable not
changing. This change reverts the bottom_toolbar_shadow to its
original state (crrev.com/c/646428) and creates a separate one for
Chrome Modern.

BUG=

Change-Id: I3b7964cf603df1308a00942cd728726d5268f71c
Reviewed-on: https://chromium-review.googlesource.com/660984
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501332}
parent ce9184f0
...@@ -2,15 +2,23 @@ ...@@ -2,15 +2,23 @@
<!-- Copyright 2017 The Chromium Authors. All rights reserved. <!-- Copyright 2017 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. --> found in the LICENSE file. -->
<!-- ToolbarPhone uses this drawable to transition between shadows when
the omnibox focus changes. The bottom toolbar should not have a shadow
when the omnibox is unfocused so this TransitionDrawable uses an empty
shape for the focused drawable item.
TODO(twellington): Remove this after UX has a spec'ed out what the
bottom toolbar omnibox un/focus animations should look like. -->
<transition xmlns:android="http://schemas.android.com/apk/res/android"> <transition xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item>
<bitmap <shape
android:src="@drawable/toolbar_shadow_focused" android:shape="rectangle"
android:gravity="top|fill_horizontal" /> android:gravity="top|fill_horizontal" >
</shape>
</item> </item>
<item> <item>
<bitmap <bitmap
android:src="@drawable/bottom_toolbar_top_line" android:src="@drawable/toolbar_shadow_focused"
android:gravity="top|fill_horizontal" /> android:gravity="top|fill_horizontal" />
</item> </item>
</transition> </transition>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap
android:src="@drawable/toolbar_shadow_focused"
android:gravity="top|fill_horizontal" />
</item>
<item>
<bitmap
android:src="@drawable/bottom_toolbar_top_line"
android:gravity="top|fill_horizontal" />
</item>
</layer-list>
...@@ -300,7 +300,7 @@ public class BottomToolbarPhone extends ToolbarPhone { ...@@ -300,7 +300,7 @@ public class BottomToolbarPhone extends ToolbarPhone {
mBottomToolbarTopShadow = mBottomToolbarTopShadow =
(ImageView) getRootView().findViewById(R.id.bottom_toolbar_shadow); (ImageView) getRootView().findViewById(R.id.bottom_toolbar_shadow);
mBottomToolbarTopShadowDrawable = (LayerDrawable) ApiCompatibilityUtils.getDrawable( mBottomToolbarTopShadowDrawable = (LayerDrawable) ApiCompatibilityUtils.getDrawable(
getResources(), R.drawable.bottom_toolbar_shadow); getResources(), R.drawable.modern_bottom_toolbar_shadow);
mBottomToolbarTopShadowDrawable.getDrawable(0).setAlpha(255); mBottomToolbarTopShadowDrawable.getDrawable(0).setAlpha(255);
mBottomToolbarTopShadowDrawable.getDrawable(1).setAlpha(0); mBottomToolbarTopShadowDrawable.getDrawable(1).setAlpha(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment