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

The following are Jave code examples for showing how to use onApplyWindowInsets() 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: letv   File: ViewCompatLollipop.java   Source Code and License Vote up 5 votes
public static WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
    if (!(insets instanceof WindowInsetsCompatApi21)) {
        return insets;
    }
    WindowInsets unwrapped = ((WindowInsetsCompatApi21) insets).unwrap();
    WindowInsets result = v.onApplyWindowInsets(unwrapped);
    if (result != unwrapped) {
        return new WindowInsetsCompatApi21(result);
    }
    return insets;
}
 
Example 2
Project: boohee_v5.6   File: ViewCompatLollipop.java   Source Code and License Vote up 5 votes
public static WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
    if (!(insets instanceof WindowInsetsCompatApi21)) {
        return insets;
    }
    WindowInsets unwrapped = ((WindowInsetsCompatApi21) insets).unwrap();
    WindowInsets result = v.onApplyWindowInsets(unwrapped);
    if (result != unwrapped) {
        return new WindowInsetsCompatApi21(result);
    }
    return insets;
}