Commit e12c3715 authored by Shakti Sahu's avatar Shakti Sahu Committed by Commit Bot

Removed usage of AppBarLayout

As a part of effort to reduce the apk size, this CL removes the usage of
AppBarLayout from download home and clear browsing history.

Bug: 956332
Change-Id: Ia8e71fa8b703610836c975fc86f7a354981ebeab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611218
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660260}
parent 867b582d
...@@ -5,34 +5,36 @@ ...@@ -5,34 +5,36 @@
<!-- Layout used by ClearBrowsingDataTabsFragment --> <!-- Layout used by ClearBrowsingDataTabsFragment -->
<android.support.design.widget.CoordinatorLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout <!-- RTL is handled manually in ClearBrowsingDataTabsFragment because
it is not working correctly with a ViewPager -->
<android.support.design.widget.TabLayout
android:id="@+id/clear_browsing_data_tabs"
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"
<!-- RTL is handled manually in ClearBrowsingDataTabsFragment because app:tabSelectedTextColor="@color/tab_layout_selected_tab_color"
it is not working correctly with a ViewPager --> app:tabMode="fixed"
<android.support.design.widget.TabLayout app:tabMaxWidth="0dp"
android:id="@+id/clear_browsing_data_tabs" app:tabGravity="fill"/>
android:layoutDirection="ltr"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabTextColor="@color/default_text_color_tertiary"
app:tabSelectedTextColor="@color/tab_layout_selected_tab_color"
app:tabMode="fixed"
app:tabMaxWidth="0dp"
app:tabGravity="fill" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/clear_browsing_data_viewpager" android:id="@+id/clear_browsing_data_viewpager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> android:layout_below="@id/clear_browsing_data_tabs"
</android.support.design.widget.CoordinatorLayout> app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<ImageView
style="@style/TabBarShadow"
android:layout_below="@id/clear_browsing_data_tabs"
android:importantForAccessibility="no"/>
</RelativeLayout>
...@@ -641,6 +641,18 @@ ...@@ -641,6 +641,18 @@
<item name="android:layout_height">48dp</item> <item name="android:layout_height">48dp</item>
<item name="android:layout_gravity">center</item> <item name="android:layout_gravity">center</item>
</style> </style>
<style name="TabBarShadow">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/action_bar_shadow_height</item>
<item name="android:src">@drawable/modern_toolbar_shadow</item>
<item name="android:scaleType">fitXY</item>
</style>
<style name="TabBarLineShadow">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:src">@color/hairline_stroke_color</item>
<item name="android:scaleType">fitXY</item>
</style>
<style name="AppMenuItem"> <style name="AppMenuItem">
<item name="android:paddingStart">16dp</item> <item name="android:paddingStart">16dp</item>
......
...@@ -4,46 +4,47 @@ ...@@ -4,46 +4,47 @@
found in the LICENSE file. found in the LICENSE file.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <android.support.design.widget.TabLayout
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"
<android.support.design.widget.TabLayout app:tabMode="fixed"
android:id="@+id/tabs" app:tabGravity="fill"
android:layout_width="match_parent" 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:id="@+id/files_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:tabMaxWidth="0dp" android:text="@string/download_manager_files_tab"/>
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:id="@+id/files_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/download_manager_files_tab"/>
<android.support.design.widget.TabItem
android:id="@+id/prefetch_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ntp_article_suggestions_section_header"/>
</android.support.design.widget.TabLayout> <android.support.design.widget.TabItem
android:id="@+id/prefetch_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ntp_article_suggestions_section_header"/>
</android.support.design.widget.AppBarLayout> </android.support.design.widget.TabLayout>
<FrameLayout <FrameLayout
android:id="@+id/content_container" android:id="@+id/content_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tabs"
android:paddingTop="16dp"/> android:paddingTop="16dp"/>
</LinearLayout>
<ImageView
style="@style/TabBarLineShadow"
android:layout_below="@+id/tabs"
android:importantForAccessibility="no"/>
</RelativeLayout>
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