Merge "Introduce "qsb_container_hotseat" layout to override the existing search_container_hotseat." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
cf00d63c2e
@@ -57,7 +57,7 @@ flag {
|
||||
}
|
||||
flag {
|
||||
name: "enable_qsb_on_hotseat"
|
||||
namespace: "launcher"
|
||||
namespace: "launcher_search"
|
||||
description: "Enable Search App's widget on hotseat"
|
||||
bug: "405226308"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2025 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.
|
||||
-->
|
||||
<View
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp" />
|
||||
@@ -100,7 +100,14 @@ public class Hotseat extends CellLayout implements Insettable {
|
||||
|
||||
public Hotseat(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
mQsb = LayoutInflater.from(context).inflate(R.layout.search_container_hotseat, this, false);
|
||||
if (Flags.enableQsbOnHotseat()) {
|
||||
mQsb = LayoutInflater.from(context).inflate(R.layout.qsb_container_hotseat, this,
|
||||
false);
|
||||
} else {
|
||||
mQsb = LayoutInflater.from(context).inflate(R.layout.search_container_hotseat, this,
|
||||
false);
|
||||
}
|
||||
|
||||
addView(mQsb);
|
||||
mIconsAlphaChannels = new MultiValueAlpha(getShortcutsAndWidgets(),
|
||||
ALPHA_CHANNEL_CHANNELS_COUNT);
|
||||
|
||||
Reference in New Issue
Block a user