List of usage examples for android.view View IMPORTANT_FOR_ACCESSIBILITY_YES
int IMPORTANT_FOR_ACCESSIBILITY_YES
To view the source code for android.view View IMPORTANT_FOR_ACCESSIBILITY_YES.
Click Source Link
From source file:com.phonemetra.turbo.launcher.Workspace.java
/** * Used to inflate the Workspace from XML. * * @param context The application's context. * @param attrs The attributes set containing the Workspace's customization values. * @param defStyle Unused.//from w w w . ja v a 2 s . c o m */ public Workspace(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mContentIsRefreshable = false; mOutlineHelper = HolographicOutlineHelper.obtain(context); mDragEnforcer = new DropTarget.DragEnforcer(context); // With workspace, data is available straight from the get-go setDataIsReady(); mShowSearchBar = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH, R.bool.preferences_interface_homescreen_search_default); mShowOutlines = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_PAGE_OUTLINES, R.bool.preferences_interface_homescreen_scrolling_page_outlines_default); mHideIconLabels = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_HIDE_ICON_LABELS, R.bool.preferences_interface_homescreen_hide_icon_labels_default); mWorkspaceFadeInAdjacentScreens = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_FADE_ADJACENT, R.bool.preferences_interface_homescreen_scrolling_fade_adjacent_default); TransitionEffect.setFromString(this, SettingsProvider.getString(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_TRANSITION_EFFECT, R.string.preferences_interface_homescreen_scrolling_transition_effect)); mLauncher = (Launcher) context; final Resources res = getResources(); mFadeInAdjacentScreens = false; mWallpaperManager = WallpaperManager.getInstance(context); LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Workspace, defStyle, 0); mSpringLoadedShrinkFactor = res.getInteger(R.integer.config_workspaceSpringLoadShrinkPercentage) / 100.0f; mOverviewModeShrinkFactor = grid.getOverviewModeScale(); mCameraDistance = res.getInteger(R.integer.config_cameraDistance); mDefaultPage = a.getInt(R.styleable.Workspace_defaultScreen, 1); mDefaultScreenId = SettingsProvider.getLongCustomDefault(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_DEFAULT_SCREEN_ID, -1); a.recycle(); setOnHierarchyChangeListener(this); setHapticFeedbackEnabled(false); initWorkspace(); // Disable multitouch across the workspace/all apps/customize tray setMotionEventSplittingEnabled(true); setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); }
From source file:android.support.wear.widget.drawer.WearableDrawerLayout.java
private void allowAccessibilityFocusOnAllChildren() { if (!mIsAccessibilityEnabled) { return;/* www. j av a 2 s . c o m*/ } for (int i = 0; i < getChildCount(); i++) { getChildAt(i).setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); } }
From source file:org.mozilla.gecko.BrowserApp.java
@Override public void onTabsLayoutChange(int width, int height) { int animationLength = TABS_ANIMATION_DURATION; if (mMainLayoutAnimator != null) { animationLength = Math.max(1, animationLength - (int) mMainLayoutAnimator.getRemainingTime()); mMainLayoutAnimator.stop(false); }//www .j ava2s. c om if (areTabsShown()) { mTabsPanel.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS); // Hide the web content from accessibility tools even though it's visible // so that you can't examine it as long as the tabs are being shown. if (Versions.feature16Plus) { mLayerView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); } } else { if (Versions.feature16Plus) { mLayerView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); } } mMainLayoutAnimator = new PropertyAnimator(animationLength, sTabsInterpolator); mMainLayoutAnimator.addPropertyAnimationListener(this); mMainLayoutAnimator.attach(mMainLayout, PropertyAnimator.Property.SCROLL_Y, -height); mTabsPanel.prepareTabsAnimation(mMainLayoutAnimator); mBrowserToolbar.triggerTabsPanelTransition(mMainLayoutAnimator, areTabsShown()); // If the tabs panel is animating onto the screen, pin the dynamic // toolbar. if (mDynamicToolbar.isEnabled()) { if (width > 0 && height > 0) { mDynamicToolbar.setPinned(true, PinReason.RELAYOUT); mDynamicToolbar.setVisible(true, VisibilityTransition.ANIMATE); } else { mDynamicToolbar.setPinned(false, PinReason.RELAYOUT); } } mMainLayoutAnimator.start(); }
From source file:org.chromium.chrome.browser.tab.Tab.java
/** * Update whether or not the current native tab and/or web contents are * currently visible (from an accessibility perspective), or whether * they're obscured by another view.//from ww w .j a va2 s. c o m */ public void updateAccessibilityVisibility() { View view = getView(); if (view != null) { int importantForAccessibility = isObscuredByAnotherViewForAccessibility() ? View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS : View.IMPORTANT_FOR_ACCESSIBILITY_YES; if (view.getImportantForAccessibility() != importantForAccessibility) { view.setImportantForAccessibility(importantForAccessibility); view.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED); } } ContentViewCore cvc = getContentViewCore(); if (cvc != null) { boolean isWebContentObscured = isObscuredByAnotherViewForAccessibility() || isShowingSadTab(); cvc.setObscuredByAnotherView(isWebContentObscured); } }