Example usage for android.view.accessibility AccessibilityEvent setFullScreen

List of usage examples for android.view.accessibility AccessibilityEvent setFullScreen

Introduction

In this page you can find the example usage for android.view.accessibility AccessibilityEvent setFullScreen.

Prototype

public void setFullScreen(boolean isFullScreen) 

Source Link

Document

Sets if the source is taking the entire screen.

Usage

From source file:android.app.Activity.java

public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
    event.setClassName(getClass().getName());
    event.setPackageName(getPackageName());

    LayoutParams params = getWindow().getAttributes();
    boolean isFullScreen = (params.width == LayoutParams.MATCH_PARENT)
            && (params.height == LayoutParams.MATCH_PARENT);
    event.setFullScreen(isFullScreen);

    CharSequence title = getTitle();
    if (!TextUtils.isEmpty(title)) {
        event.getText().add(title);//ww w.  j  a v  a2  s.c o  m
    }

    return true;
}