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

Commit d6260415 authored by Tony Huang's avatar Tony Huang
Browse files

Remove apps row item shadow

Because apps icon might have its background in any shape like
circle or square, fixed circle shadow will cause UI issue.
Remove the shadow for any UI concern.

Fix: 124316231
Test: visual
Test: atest DocumentsUITests
Change-Id: I2cd938f77d052eae2e328c1b2e6c1251bd4da0b9
parent 73efb8d2
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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="oval">

    <solid android:color="?attr/colorBackgroundFloating" />

</shape>
 No newline at end of file
+1 −3
Original line number Diff line number Diff line
@@ -32,9 +32,7 @@
        android:layout_marginTop="@dimen/apps_row_app_icon_margin_top"
        android:layout_marginBottom="@dimen/apps_row_app_icon_margin_bottom"
        android:layout_marginStart="@dimen/apps_row_app_icon_margin_horizontal"
        android:layout_marginEnd="@dimen/apps_row_app_icon_margin_horizontal"
        android:background="@drawable/apps_row_icon_background"
        android:elevation="3dp"/>
        android:layout_marginEnd="@dimen/apps_row_app_icon_margin_horizontal"/>

    <TextView
        android:id="@android:id/title"
+0 −11
Original line number Diff line number Diff line
@@ -16,10 +16,8 @@

package com.android.documentsui.dirlist;

import android.graphics.Outline;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewOutlineProvider;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -45,13 +43,6 @@ public class AppsRowManager {
    private final ActionHandler mActionHandler;
    private final List<AppsRowItemData> mDataList;

    private static final ViewOutlineProvider OVAL_OUTLINE_PROVIDER = new ViewOutlineProvider() {
        @Override
        public void getOutline(View view, Outline outline) {
            outline.setOval(0, 0, view.getWidth(), view.getHeight());
        }
    };

    public AppsRowManager(ActionHandler handler) {
        mDataList = new ArrayList<>();
        mActionHandler = handler;
@@ -105,7 +96,5 @@ public class AppsRowManager {
        title.setText(data.getTitle());
        exit_icon.setVisibility(data.showExitIcon() ? View.VISIBLE : View.GONE);
        view.setOnClickListener(v -> data.onClicked());

        app_icon.setOutlineProvider(OVAL_OUTLINE_PROVIDER);
    }
}