Package 

Class WindowCompat

    • Method Detail

      • requireViewById

        @NonNull() static <T extends View> T requireViewById(@NonNull() Window window, @IdRes() int id)

        Finds a view that was identified by the {@code android:id} XML attributethat was processed in onCreate, or throws anIllegalArgumentException if the ID is invalid, or there is no matching view in the hierarchy.

        Note: In most cases -- depending on compiler support --the resulting view is automatically cast to the target class type. Ifthe target class type is unconstrained, an explicit cast may benecessary.

        Parameters:
        id - the ID to search for
      • setDecorFitsSystemWindows

         static void setDecorFitsSystemWindows(@NonNull() Window window, boolean decorFitsSystemWindows)

        Sets whether the decor view should fit root-level content views for WindowInsetsCompat.

        If set to {@code false}, the framework will not fit the content view to the insets and willjust pass through the WindowInsetsCompat to the content view.

        Please note: using the setSystemUiVisibility API in your app canconflict with this method. Please discontinue use of setSystemUiVisibility.

        Parameters:
        window - The current window.
        decorFitsSystemWindows - Whether the decor view should fit root-level content views forinsets.