Commit c263048b authored by Lijin Shen's avatar Lijin Shen Committed by Commit Bot

[Snowflake] Update tabbed UI to GM2

This CL updates tab indicator style on downloads, translate infobar
and clear browsing data tab layouts.

Bug: 945924
Change-Id: Ic034af92ca78aae0e6813e29d3f6a2d78006b064
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1849210Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Lijin Shen <lazzzis@google.com>
Cr-Commit-Position: refs/heads/master@{#704712}
parent 67e4d54c
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 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
android:left="@dimen/tab_indicator_padding"
android:right="@dimen/tab_indicator_padding" >
<shape android:shape="rectangle" >
<corners
android:topRightRadius="@dimen/tab_indicator_radius"
android:topLeftRadius="@dimen/tab_indicator_radius" />
</shape>
</item>
</layer-list>
...@@ -19,11 +19,7 @@ ...@@ -19,11 +19,7 @@
android:layoutDirection="ltr" android:layoutDirection="ltr"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:tabTextColor="@color/default_text_color_tertiary" style="@style/TabLayoutStyle" />
app:tabSelectedTextColor="@color/tab_layout_selected_tab_color"
app:tabMode="fixed"
app:tabMaxWidth="0dp"
app:tabGravity="fill"/>
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/clear_browsing_data_viewpager" android:id="@+id/clear_browsing_data_viewpager"
......
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
android:layout_weight="1" android:layout_weight="1"
android:requiresFadingEdge="horizontal" android:requiresFadingEdge="horizontal"
android:fadingEdgeLength="@dimen/infobar_translate_fade_edge_length" android:fadingEdgeLength="@dimen/infobar_translate_fade_edge_length"
app:tabIndicatorColor="@color/tab_layout_selected_tab_color" app:tabIndicator="@drawable/tab_indicator"
app:tabIndicatorFullWidth="false"
app:tabIndicatorHeight="3dp"
app:tabSelectedTextColor="@color/tab_layout_selected_tab_color" app:tabSelectedTextColor="@color/tab_layout_selected_tab_color"
app:tabGravity="fill" app:tabGravity="fill"
app:tabMode="scrollable" /> app:tabMode="scrollable" />
......
...@@ -685,4 +685,9 @@ ...@@ -685,4 +685,9 @@
<dimen name="theme_preferences_checkbox_margin_end">8dp</dimen> <dimen name="theme_preferences_checkbox_margin_end">8dp</dimen>
<dimen name="theme_preferences_checkbox_container_padding_start">60dp</dimen> <dimen name="theme_preferences_checkbox_container_padding_start">60dp</dimen>
<dimen name="theme_preferences_checkbox_container_padding_end">16dp</dimen> <dimen name="theme_preferences_checkbox_container_padding_end">16dp</dimen>
<!-- Dimens of tab indicator -->
<dimen name="tab_indicator_height">3dp</dimen>
<dimen name="tab_indicator_radius">3dp</dimen>
<dimen name="tab_indicator_padding">2dp</dimen>
</resources> </resources>
...@@ -633,6 +633,20 @@ ...@@ -633,6 +633,20 @@
<item name="android:textSize">@dimen/text_size_medium</item> <item name="android:textSize">@dimen/text_size_medium</item>
</style> </style>
<!-- Tab Layout -->
<style name="TabLayoutStyle">
<item name="tabIndicator">@drawable/tab_indicator</item>
<item name="tabIndicatorFullWidth">false</item>
<item name="tabIndicatorHeight">@dimen/tab_indicator_height</item>
<item name="tabPaddingStart">5dp</item>
<item name="tabPaddingEnd">5dp</item>
<item name="tabMode">fixed</item>
<item name="tabGravity">fill</item>
<item name="tabTextColor">@color/default_text_color_secondary</item>
<item name="tabSelectedTextColor">@color/tab_layout_selected_tab_color</item>
<item name="android:background">@color/modern_primary_color</item>
</style>
<!-- Misc styles --> <!-- Misc styles -->
<style name="LocationBarButton"> <style name="LocationBarButton">
<item name="android:background">@null</item> <item name="android:background">@null</item>
......
...@@ -14,12 +14,7 @@ ...@@ -14,12 +14,7 @@
android:id="@+id/tabs" android:id="@+id/tabs"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:tabMaxWidth="0dp" style="@style/TabLayoutStyle" >
app:tabMode="fixed"
app:tabGravity="fill"
app:tabTextColor="@color/default_text_color_tertiary"
app:tabSelectedTextColor="@color/tab_layout_selected_tab_color"
android:background="@color/modern_primary_color">
<android.support.design.widget.TabItem <android.support.design.widget.TabItem
android:id="@+id/files_tab" android:id="@+id/files_tab"
......
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