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

Commit d2561263 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Using a common class for loading drawables and handling various badging" into oc-dev

parents 36a3579c 3b172d7b
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2017 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
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="48dp"
        android:height="48dp"
        android:viewportWidth="48"
        android:viewportHeight="48">
    <path
        android:fillColor="#FFFFFF"
        android:fillType="evenOdd"
        android:pathData="M 24.5 2.7 C 35.5456949966 2.7 44.5 11.6543050034 44.5 22.7 C 44.5 33.7456949966 35.5456949966 42.7 24.5 42.7 C 13.4543050034 42.7 4.5 33.7456949966 4.5 22.7 C 4.5 11.6543050034 13.4543050034 2.7 24.5 2.7 Z" />
    <path
        android:fillColor="#757575"
        android:fillType="evenOdd"
        android:pathData="M 33.3 19.1 L 26.4 19.1 L 26.4 5.8 L 16.6 26.4 L 23.5 26.3 L 23.5 39.6 Z" />
    <path
        android:fillType="evenOdd"
        android:pathData="M 0.5 0 H 48.5 V 48 H 0.5 V 0 Z" />
</vector>
 No newline at end of file
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2017 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">
    <gradient android:type="radial"
        android:startColor="#4d000000"
        android:endColor="#00000000"
        android:gradientRadius="12dp"/>
</shape>
 No newline at end of file
+8 −23
Original line number Diff line number Diff line
@@ -31,28 +31,13 @@
        android:paddingEnd="0dp"
        android:paddingTop="24dp"
        android:paddingBottom="24dp">

        <FrameLayout android:id="@+id/app_icon_frame"
                     android:layout_width="56dp"
                     android:layout_height="56dp"
                     android:clipChildren="false"
                     android:clipToPadding="false">
        <ImageView
            android:id="@+id/app_detail_icon"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
            android:layout_width="56dp"
            android:layout_height="56dp"
            android:scaleType="fitXY"
            android:layout_gravity="center_horizontal"
            android:antialias="true"/>
            <ImageView android:id="@+id/app_icon_instant_apps_badge"
                android:layout_width="22dp"
                android:layout_height="22dp"
                android:layout_gravity="end|bottom"
                android:layout_margin="4dp"
                android:elevation="20dp"
                android:background="@drawable/ic_instant_apps_badge_bg"
                android:src="@drawable/ic_instant_apps_badge" />
        </FrameLayout>

        <LinearLayout
            android:id="@+id/app_detail_links"
@@ -86,7 +71,7 @@
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toEndOf="@id/app_icon_frame"
            android:layout_toEndOf="@id/app_detail_icon"
            android:layout_toStartOf="@id/app_detail_links"
            android:paddingStart="24dp"
            android:paddingEnd="24dp"
+0 −1
Original line number Diff line number Diff line
@@ -242,7 +242,6 @@
    <dimen name="mdm_app_icon_width_height">56dp</dimen>

    <!-- Launcher Icons -->
    <dimen name="launcher_icon_elevation">6dp</dimen>
    <dimen name="shortcut_size_maskable">120dp</dimen>
    <dimen name="shortcut_size">40dp</dimen>
    <dimen name="shortcut_icon_size">16dp</dimen>
+1 −4
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ public class AppHeaderController {
    }

    public static final String PREF_KEY_APP_HEADER = "pref_app_header";

    private static final String TAG = "AppDetailFeature";

    private final Context mContext;
@@ -179,10 +180,6 @@ public class AppHeaderController {
        ImageView iconView = mAppHeader.findViewById(R.id.app_detail_icon);
        if (iconView != null) {
            iconView.setImageDrawable(mIcon);
            ImageView badgeView = mAppHeader.findViewById(R.id.app_icon_instant_apps_badge);
            if (badgeView != null) {
                badgeView.setVisibility(mIsInstantApp ? View.VISIBLE : View.GONE);
            }
        }
        setText(R.id.app_detail_title, mLabel);
        setText(R.id.app_detail_summary, mSummary);
Loading