Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6a5f2a4 authored by Bill Lin's avatar Bill Lin
Browse files

Add overlayable.xml to define customization scope

1) Define overlayable scope in DocumentsUI
2) Define android:targetName="DocumentsUIThemeOverlay" for overlay package
3) Fix Drawer selector visual issue

Change-Id: Ided1e26b5a732a327107f3d597ed7e5e96e86d5f
Fix: 127615752
Fix: 128502868
Test: atest DocumentsUIGoogleTests
parent 9ddf56e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,5 +20,5 @@
        android:color="@color/root_icon_color" />
    <item
        android:state_activated="true"
        android:color="@color/root_activated_color" />
        android:color="?android:colorControlActivated" />
</selector>
+2 −2
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:state_focused="true" android:state_activated="true" android:color="@color/root_activated_color" />
  <item android:state_focused="false" android:state_activated="true" android:color="@color/root_activated_color" />
    <item android:state_focused="true" android:state_activated="true" android:color="?android:colorControlActivated" />
    <item android:state_focused="false" android:state_activated="true" android:color="?android:colorControlActivated" />
    <item android:state_enabled="false" android:alpha="0.5" android:color="?android:textColorPrimary" />
    <item android:color="?android:textColorPrimary" />
</selector>
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="true" android:state_activated="true" android:color="?android:colorAccent" />
    <item android:state_focused="false" android:state_activated="true" android:color="?android:colorAccent" />
    <item android:state_enabled="false" android:alpha="0.5" android:color="?android:textColorSecondary" />
    <item android:color="?android:textColorSecondary" />
</selector>
+3 −5
Original line number Diff line number Diff line
@@ -17,22 +17,20 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <style name="DocumentsTheme" parent="@android:style/Theme.DeviceDefault.DocumentsUI">

        <!-- Define versionCode and revisionCode for resource -->
        <item name="android:versionCode">0</item>
        <item name="android:revisionCode">0</item>
        <!-- Toolbar -->
        <item name="android:actionModeBackground">?android:attr/colorBackground</item>
        <item name="android:actionBarSize">@dimen/action_bar_size</item>
        <item name="android:actionModeCloseDrawable">@drawable/ic_action_clear</item>

        <!-- Color section -->
        <item name="android:colorAccent">@color/accent</item>
        <item name="android:colorBackground">@color/app_background_color</item>
        <item name="android:colorBackgroundFloating">@color/item_doc_background</item>
        <item name="android:colorControlNormal">?android:colorAccent</item>
        <item name="android:colorControlHighlight">@color/ripple_material_dark</item>
        <item name="android:colorControlActivated">?android:colorAccent</item>
        <item name="android:colorControlActivated">@color/root_activated_color</item>
        <item name="android:colorPrimary">@color/primary</item>
        <item name="android:colorSecondary">@color/secondary</item>

        <!-- System | Widget section -->
        <item name="android:listDivider">@drawable/list_divider</item>
        <item name="android:statusBarColor">?android:attr/colorBackground</item>
+52 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- The collection of resources for theming the appearance of a device -->
<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <overlayable name="DocumentsUICustomization">

        <!-- START VENDOR CUSTOMIZATION -->
        <policy type="product|system|vendor">
            <!-- START THEME / STYLE -->
            <item type="style" name="DocumentsTheme"/>
            <!-- END THEME / STYLE -->

            <!-- START DIMEN -->
            <item type="dimen" name="grid_item_radius"/>
            <!-- END DIMEN -->

            <!-- START DRAWABLE -->
            <item type="drawable" name="ic_eject"/>
            <item type="drawable" name="ic_root_download"/>
            <item type="drawable" name="ic_sd_storage"/>
            <item type="drawable" name="root_list_selector"/>
            <item type="drawable" name="root_list_selector_mask"/>
            <!-- END DRAWABLE -->

            <!-- START CONFIG -->
            <item type="bool" name="is_launcher_enabled"/>
            <item type="string" name="default_root_uri"/>
            <item type="string" name="preferred_root_package"/>
            <item type="string" name="trusted_quick_viewer_package"/>
            <!-- END CONFIG -->

        </policy>
        <!-- END VENDOR CUSTOMIZATION -->

    </overlayable>

</resources>
Loading