Files
Lawnchair/src/com/android/launcher3/views/AllAppsButton.java
T
Jon Miranda fd48b0c988 Add All Apps entry button to Taskbar.
- Opens All Apps when clicked
- Fades button in/out when transitioning b/w Hotseat & Taskbar

Bug: 205803230
Test: manual
      ensures alpha gets reset properly
      clicking button opens all apps
Change-Id: I1b96bae734aa9fd9308931d6312e3d65559d4284
2022-01-31 17:22:58 -08:00

48 lines
1.6 KiB
Java

/*
* Copyright (C) 2022 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.
*/
package com.android.launcher3.views;
import android.content.Context;
import android.graphics.Bitmap;
import android.util.AttributeSet;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.icons.FastBitmapDrawable;
/**
* Button in Taskbar that opens All Apps.
*/
public class AllAppsButton extends BubbleTextView {
public AllAppsButton(Context context) {
this(context, null);
}
public AllAppsButton(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public AllAppsButton(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
Bitmap bitmap = LauncherAppState.getInstance(context).getIconCache().getIconFactory()
.createScaledBitmapWithShadow(context.getDrawable(R.drawable.ic_all_apps_button));
setIcon(new FastBitmapDrawable(bitmap));
}
}