Java Code Examples for android.view.View.hasWindowFocus()

The following are Jave code examples for showing how to use hasWindowFocus() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 2
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 3
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 4
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 5
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 6
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 7
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 8
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 9
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 10
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 11
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 12
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 13
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}
 
Example 14
Project: ProgressManager   File: a.java   Source Code and License Vote up 5 votes
/**
 * Returns true if this activity's <em>main</em> window currently has window focus.
 * Note that this is not the same as the view itself having focus.
 *
 * @return True if this activity's main window currently has window focus.
 *
 * @see #onWindowAttributesChanged(android.view.WindowManager.LayoutParams)
 */
public boolean hasWindowFocus() {
    Window w = getWindow();
    if (w != null) {
        View d = w.getDecorView();
        if (d != null) {
            return d.hasWindowFocus();
        }
    }
    return false;
}