關於螢幕下方的三個虛擬按鍵的一些摘要
阿新 • • 發佈:2019-01-06
private View.OnLongClickListener mLongPressBackRecentsListener = //長按back和recent兩個key
new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
handleLongPressBackRecents(v);
return true;
}
};
private final View.OnLongClickListener mLongPressHomeListener //長按home key
= new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
if (shouldDisableNavbarGestures()) {
return false;
}
MetricsLogger.action(mContext, MetricsLogger.ACTION_ASSIST_LONG_PRESS);
mAssistManager.startAssist(new Bundle() /* args */);
awakenDreams();
if (mNavigationBarView != null) {
mNavigationBarView.abortCurrentGesture();
}
return true;
}
};
new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
handleLongPressBackRecents(v);
return true;
}
};
private final View.OnLongClickListener mLongPressHomeListener //長按home key
= new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
if (shouldDisableNavbarGestures()) {
return false;
}
MetricsLogger.action(mContext, MetricsLogger.ACTION_ASSIST_LONG_PRESS);
mAssistManager.startAssist(new Bundle() /* args */);
awakenDreams();
if (mNavigationBarView != null) {
mNavigationBarView.abortCurrentGesture();
}
return true;
}
};