use of com.android.launcher3.Hotseat in project Neo-Launcher by NeoApplications.
the class LauncherRecentsView method shouldStealTouchFromSiblingsBelow.
@Override
protected boolean shouldStealTouchFromSiblingsBelow(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
// Allow touches to go through to the hotseat.
Hotseat hotseat = mActivity.getHotseat();
boolean touchingHotseat = hotseat.isShown() && mActivity.getDragLayer().isEventOverView(hotseat, ev, this);
return !touchingHotseat;
}
return super.shouldStealTouchFromSiblingsBelow(ev);
}
use of com.android.launcher3.Hotseat in project Neo-Launcher by NeoApplications.
the class LauncherRecentsView method createAdjacentPageAnimForTaskLaunch.
/**
* Animates adjacent tasks and translate hotseat off screen as well.
*/
@Override
public AnimatorSet createAdjacentPageAnimForTaskLaunch(TaskView tv, ClipAnimationHelper helper) {
AnimatorSet anim = super.createAdjacentPageAnimForTaskLaunch(tv, helper);
if (!SysUINavigationMode.getMode(mActivity).hasGestures) {
// so don't animate it here either.
return anim;
}
float allAppsProgressOffscreen = ALL_APPS_PROGRESS_OFF_SCREEN;
LauncherState state = mActivity.getStateManager().getState();
if ((state.getVisibleElements(mActivity) & ALL_APPS_HEADER_EXTRA) != 0) {
float maxShiftRange = mActivity.getDeviceProfile().heightPx;
float currShiftRange = mActivity.getAllAppsController().getShiftRange();
allAppsProgressOffscreen = 1f + (maxShiftRange - currShiftRange) / maxShiftRange;
}
anim.play(ObjectAnimator.ofFloat(mActivity.getAllAppsController(), ALL_APPS_PROGRESS, allAppsProgressOffscreen));
ObjectAnimator dragHandleAnim = ObjectAnimator.ofInt(mActivity.findViewById(R.id.scrim_view), ScrimView.DRAG_HANDLE_ALPHA, 0);
dragHandleAnim.setInterpolator(Interpolators.ACCEL_2);
anim.play(dragHandleAnim);
return anim;
}
use of com.android.launcher3.Hotseat in project Neo-Launcher by NeoApplications.
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;
}
use of com.android.launcher3.Hotseat in project Neo-Launcher by NeoApplications.
the class CellLayout method commitTempPlacement.
private void commitTempPlacement() {
mTmpOccupied.copyTo(mOccupied);
int screenId = Launcher.cast(mActivity).getWorkspace().getIdForScreen(this);
int container = Favorites.CONTAINER_DESKTOP;
if (mContainerType == HOTSEAT) {
screenId = -1;
container = Favorites.CONTAINER_HOTSEAT;
}
int childCount = mShortcutsAndWidgets.getChildCount();
for (int i = 0; i < childCount; i++) {
View child = mShortcutsAndWidgets.getChildAt(i);
LayoutParams lp = (LayoutParams) child.getLayoutParams();
ItemInfo info = (ItemInfo) child.getTag();
// AllApps button in the hotseat.
if (info != null) {
final boolean requiresDbUpdate = (info.cellX != lp.tmpCellX || info.cellY != lp.tmpCellY || info.spanX != lp.cellHSpan || info.spanY != lp.cellVSpan);
info.cellX = lp.cellX = lp.tmpCellX;
info.cellY = lp.cellY = lp.tmpCellY;
info.spanX = lp.cellHSpan;
info.spanY = lp.cellVSpan;
if (requiresDbUpdate) {
Launcher.cast(mActivity).getModelWriter().modifyItemInDatabase(info, container, screenId, info.cellX, info.cellY, info.spanX, info.spanY);
}
}
}
}
use of com.android.launcher3.Hotseat in project Neo-Launcher by NeoApplications.
the class Launcher method dump.
/**
* $ adb shell dumpsys activity com.android.launcher3.Launcher [--all]
*/
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
super.dump(prefix, fd, writer, args);
if (args.length > 0 && TextUtils.equals(args[0], "--all")) {
writer.println(prefix + "Workspace Items");
for (int i = 0; i < mWorkspace.getPageCount(); i++) {
writer.println(prefix + " Homescreen " + i);
ViewGroup layout = ((CellLayout) mWorkspace.getPageAt(i)).getShortcutsAndWidgets();
for (int j = 0; j < layout.getChildCount(); j++) {
Object tag = layout.getChildAt(j).getTag();
if (tag != null) {
writer.println(prefix + " " + tag.toString());
}
}
}
writer.println(prefix + " Hotseat");
ViewGroup layout = mHotseat.getShortcutsAndWidgets();
for (int j = 0; j < layout.getChildCount(); j++) {
Object tag = layout.getChildAt(j).getTag();
if (tag != null) {
writer.println(prefix + " " + tag.toString());
}
}
}
writer.println(prefix + "Misc:");
dumpMisc(prefix + "\t", writer);
writer.println(prefix + "\tmWorkspaceLoading=" + mWorkspaceLoading);
writer.println(prefix + "\tmPendingRequestArgs=" + mPendingRequestArgs + " mPendingActivityResult=" + mPendingActivityResult);
writer.println(prefix + "\tmRotationHelper: " + mRotationHelper);
writer.println(prefix + "\tmAppWidgetHost.isListening: " + mAppWidgetHost.isListening());
// Extra logging for b/116853349
mDragLayer.dump(prefix, writer);
mStateManager.dump(prefix, writer);
try {
FileLog.flushAll(writer);
} catch (Exception e) {
// Ignore
}
mModel.dumpState(prefix, fd, writer, args);
if (mLauncherCallbacks != null) {
mLauncherCallbacks.dump(prefix, fd, writer, args);
}
}
Aggregations