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

Commit e751d90c authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Implement 3 shades of folder icon/container fill color

Bug: 130451254

Change-Id: I36d885a2b0247f1bb84cb98073459853ae723331
parent c857ad80
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -35,6 +35,10 @@ import java.util.ArrayList;
@TargetApi(Build.VERSION_CODES.P)
public class WallpaperColorInfo implements OnColorsChangedListener {

    private static final int MAIN_COLOR_LIGHT = 0xffdadce0;
    private static final int MAIN_COLOR_DARK = 0xff202124;
    private static final int MAIN_COLOR_REGULAR = 0xff000000;

    private static final Object sInstanceLock = new Object();
    private static WallpaperColorInfo sInstance;

@@ -79,6 +83,10 @@ public class WallpaperColorInfo implements OnColorsChangedListener {
        return mExtractionInfo.supportsDarkText;
    }

    public boolean isMainColorDark() {
        return mExtractionInfo.mainColor == MAIN_COLOR_DARK;
    }

    @Override
    public void onColorsChanged(WallpaperColors colors, int which) {
        if ((which & FLAG_SYSTEM) != 0) {
+21 −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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="?attr/folderFillColor" />
    <corners android:radius="?android:attr/dialogCornerRadius" />
</shape>
+21 −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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="?attr/folderFillColor" />
    <corners android:radius="@dimen/bg_round_rect_radius" />
</shape>
+1 −0
Original line number Diff line number Diff line
@@ -18,5 +18,6 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:launcher="http://schemas.android.com/apk/res-auto"
    style="@style/BaseIcon"
    android:textColor="?attr/folderTextColor"
    android:includeFontPadding="false"
    launcher:iconDisplay="folder" />
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
    xmlns:launcher="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/round_rect_primary"
    android:background="@drawable/round_rect_folder"
    android:elevation="5dp"
    android:orientation="vertical" >

Loading