Java Code Examples for android.view.WindowId

The following are top voted examples for showing how to use android.view.WindowId. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: ApkLauncher   File: WindowFocusObserver.java   View source code 5 votes vote down vote up
@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    WindowId token = getWindow().getDecorView().getWindowId();
    token.registerFocusObserver(mObserver);
    mState.setText(token.isFocused() ? "Focused" : "Not focused");
}
 
Example 2
Project: ApiDemos   File: WindowFocusObserver.java   View source code 5 votes vote down vote up
@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    WindowId token = getWindow().getDecorView().getWindowId();
    token.registerFocusObserver(mObserver);
    mState.setText(token.isFocused() ? "Focused" : "Not focused");
}
 
Example 3
Project: felix-on-android   File: WindowFocusObserver.java   View source code 5 votes vote down vote up
@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    WindowId token = getWindow().getDecorView().getWindowId();
    token.registerFocusObserver(mObserver);
    mState.setText(token.isFocused() ? "Focused" : "Not focused");
}
 
Example 4
Project: MEng   File: WindowFocusObserver.java   View source code 5 votes vote down vote up
@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    WindowId token = getWindow().getDecorView().getWindowId();
    token.registerFocusObserver(mObserver);
    mState.setText(token.isFocused() ? "Focused" : "Not focused");
}
 
Example 5
Project: deview-2013-samples   File: WindowFocusObserver.java   View source code 5 votes vote down vote up
@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    WindowId token = getWindow().getDecorView().getWindowId();
    token.registerFocusObserver(mObserver);
    mState.setText(token.isFocused() ? "Focused" : "Not focused");
}
 
Example 6
Project: ApkLauncher   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusGained(WindowId token) {
    mState.setText("Gained focus");
}
 
Example 7
Project: ApkLauncher   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusLost(WindowId token) {
    mState.setText("Lost focus");
}
 
Example 8
Project: ApiDemos   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusGained(WindowId token) {
    mState.setText("Gained focus");
}
 
Example 9
Project: ApiDemos   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusLost(WindowId token) {
    mState.setText("Lost focus");
}
 
Example 10
Project: felix-on-android   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusGained(WindowId token) {
    mState.setText("Gained focus");
}
 
Example 11
Project: felix-on-android   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusLost(WindowId token) {
    mState.setText("Lost focus");
}
 
Example 12
Project: MEng   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusGained(WindowId token) {
    mState.setText("Gained focus");
}
 
Example 13
Project: MEng   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusLost(WindowId token) {
    mState.setText("Lost focus");
}
 
Example 14
Project: deview-2013-samples   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusGained(WindowId token) {
    mState.setText("Gained focus");
}
 
Example 15
Project: deview-2013-samples   File: WindowFocusObserver.java   View source code 4 votes vote down vote up
@Override
public void onFocusLost(WindowId token) {
    mState.setText("Lost focus");
}