зеркало из https://github.com/mozilla/gecko-dev.git
Merge fx-team to m-c a=merge
This commit is contained in:
Коммит
faca3f3abd
|
@ -487,7 +487,7 @@ abstract public class BrowserApp extends GeckoApp
|
|||
Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT);
|
||||
}
|
||||
|
||||
((GeckoApp.MainLayout) mMainLayout).setTouchEventInterceptor(new HideOnTouchListener());
|
||||
((GeckoApp.MainLayout) mMainLayout).setTouchEventInterceptor(new HideTabsTouchListener());
|
||||
((GeckoApp.MainLayout) mMainLayout).setMotionEventInterceptor(new MotionEventInterceptor() {
|
||||
@Override
|
||||
public boolean onInterceptMotionEvent(View view, MotionEvent event) {
|
||||
|
@ -1985,17 +1985,11 @@ abstract public class BrowserApp extends GeckoApp
|
|||
mBrowserSearch.setUserVisibleHint(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides certain UI elements (e.g. button toast, tabs tray) when the
|
||||
* user touches the main layout.
|
||||
*/
|
||||
private class HideOnTouchListener implements TouchEventInterceptor {
|
||||
private class HideTabsTouchListener implements TouchEventInterceptor {
|
||||
private boolean mIsHidingTabs = false;
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(View view, MotionEvent event) {
|
||||
getButtonToast().hide(false, ButtonToast.ReasonHidden.TOUCH_OUTSIDE);
|
||||
|
||||
// We need to account for scroll state for the touched view otherwise
|
||||
// tapping on an "empty" part of the view will still be considered a
|
||||
// valid touch event.
|
||||
|
|
|
@ -42,7 +42,6 @@ public class ButtonToast {
|
|||
|
||||
public enum ReasonHidden {
|
||||
CLICKED,
|
||||
TOUCH_OUTSIDE,
|
||||
TIMEOUT,
|
||||
REPLACED,
|
||||
STARTUP
|
||||
|
|
Загрузка…
Ссылка в новой задаче