use of com.android.launcher3.Hotseat in project android_packages_apps_Launcher3 by AOSPA.
the class Workspace method isPointInSelfOverHotseat.
boolean isPointInSelfOverHotseat(int x, int y) {
mTempFXY[0] = x;
mTempFXY[1] = y;
mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, mTempFXY, true);
View hotseat = mLauncher.getHotseat();
return mTempFXY[0] >= hotseat.getLeft() && mTempFXY[0] <= hotseat.getRight() && mTempFXY[1] >= hotseat.getTop() && mTempFXY[1] <= hotseat.getBottom();
}
use of com.android.launcher3.Hotseat in project android_packages_apps_Launcher3 by AOSPA.
the class DefaultLayoutProviderTest method testCustomProfileLoaded_with_icon_on_hotseat.
@Test
public void testCustomProfileLoaded_with_icon_on_hotseat() throws Exception {
writeLayoutAndLoad(new LauncherLayoutBuilder().atHotseat(0).putApp(TEST_PACKAGE, TEST_ACTIVITY));
// Verify one item in hotseat
assertEquals(1, mModelHelper.getBgDataModel().workspaceItems.size());
ItemInfo info = mModelHelper.getBgDataModel().workspaceItems.get(0);
assertEquals(LauncherSettings.Favorites.CONTAINER_HOTSEAT, info.container);
assertEquals(LauncherSettings.Favorites.ITEM_TYPE_APPLICATION, info.itemType);
}
use of com.android.launcher3.Hotseat in project android_packages_apps_Launcher3 by AOSPA.
the class BubbleTextView method shouldTextBeVisible.
public boolean shouldTextBeVisible() {
// Text should be visible everywhere but the hotseat.
Object tag = getParent() instanceof FolderIcon ? ((View) getParent()).getTag() : getTag();
ItemInfo info = tag instanceof ItemInfo ? (ItemInfo) tag : null;
return info == null || (info.container != LauncherSettings.Favorites.CONTAINER_HOTSEAT && info.container != LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION);
}
use of com.android.launcher3.Hotseat in project android_packages_apps_Launcher3 by AOSPA.
the class UnfoldMoveFromCenterHotseatAnimator method onPrepareViewsForAnimation.
@Override
protected void onPrepareViewsForAnimation() {
Hotseat hotseat = mLauncher.getHotseat();
ViewGroup hotseatIcons = hotseat.getShortcutsAndWidgets();
disableClipping(hotseat);
for (int i = 0; i < hotseatIcons.getChildCount(); i++) {
View child = hotseatIcons.getChildAt(i);
registerViewForAnimation(child);
}
}
use of com.android.launcher3.Hotseat in project android_packages_apps_Launcher3 by AOSPA.
the class LauncherUnfoldAnimationController method onResume.
/**
* Called when launcher is resumed
*/
public void onResume() {
Hotseat hotseat = mLauncher.getHotseat();
if (hotseat != null && hotseat.getQsb() instanceof HorizontalInsettableView) {
mQsbInsettable = (HorizontalInsettableView) hotseat.getQsb();
}
OneShotPreDrawListener.add(mLauncher.getWorkspace(), () -> mProgressProvider.setReadyToHandleTransition(true));
}
Aggregations