public final class

SplashScreenParamKey

extends java.lang.Object

 java.lang.Object

↳androidx.browser.trusted.splashscreens.SplashScreenParamKey

Gradle dependencies

compile group: 'androidx.browser', name: 'browser', version: '1.8.0'

  • groupId: androidx.browser
  • artifactId: browser
  • version: 1.8.0

Artifact androidx.browser:browser:1.8.0 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.browser:browser com.android.support:customtabs

Overview

The keys of the entries in the passed to TrustedWebActivityIntentBuilder.setSplashScreenParams(Bundle). This Bundle can also be assembled manually and added to the launch Intent as an extra with the key TrustedWebActivityIntentBuilder.EXTRA_SPLASH_SCREEN_PARAMS.

Summary

Fields
public static final java.lang.StringKEY_BACKGROUND_COLOR

The background color of the splash screen.

public static final java.lang.StringKEY_FADE_OUT_DURATION_MS

The duration of fade out animation in milliseconds to be played when removing splash screen.

public static final java.lang.StringKEY_IMAGE_TRANSFORMATION_MATRIX

The transformation matrix to apply to the image on the splash screen.

public static final java.lang.StringKEY_SCALE_TYPE

The to apply to the image on the splash screen.

public static final java.lang.StringKEY_VERSION

The version of splash screens to use.

Methods
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final java.lang.String KEY_VERSION

The version of splash screens to use. The value must be one of SplashScreenVersion.

public static final java.lang.String KEY_BACKGROUND_COLOR

The background color of the splash screen. The value must be an integer representing the color in RGB (alpha channel is ignored if provided). The default is white.

public static final java.lang.String KEY_SCALE_TYPE

The to apply to the image on the splash screen. The value must be an integer - the ordinal of the ScaleType. The default is .

public static final java.lang.String KEY_IMAGE_TRANSFORMATION_MATRIX

The transformation matrix to apply to the image on the splash screen. See android.widget.ImageView. Only needs to be provided if the scale type is . The value must be an array of 9 floats or null. This array can be retrieved from . The default is null.

public static final java.lang.String KEY_FADE_OUT_DURATION_MS

The duration of fade out animation in milliseconds to be played when removing splash screen. The value must be provided as an int. The default is 0 (no animation).

Source

/*
 * Copyright 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.browser.trusted.splashscreens;

import android.os.Bundle;

import androidx.browser.trusted.TrustedWebActivityIntentBuilder;

/**
 * The keys of the entries in the {@link Bundle} passed to
 * {@link TrustedWebActivityIntentBuilder#setSplashScreenParams}. This Bundle can also be assembled
 * manually and added to the launch Intent as an extra with the key
 * {@link TrustedWebActivityIntentBuilder#EXTRA_SPLASH_SCREEN_PARAMS}.
 */
public final class SplashScreenParamKey {
    /**
     * The version of splash screens to use.
     * The value must be one of {@link SplashScreenVersion}.
     */
    public static final String KEY_VERSION = "androidx.browser.trusted.KEY_SPLASH_SCREEN_VERSION";

    /**
     * The background color of the splash screen.
     * The value must be an integer representing the color in RGB (alpha channel is ignored if
     * provided). The default is white.
     */
    public static final String KEY_BACKGROUND_COLOR =
            "androidx.browser.trusted.trusted.KEY_SPLASH_SCREEN_BACKGROUND_COLOR";

    /**
     * The {@link android.widget.ImageView.ScaleType} to apply to the image on the splash
     * screen.
     * The value must be an integer - the ordinal of the ScaleType.
     * The default is {@link android.widget.ImageView.ScaleType#CENTER}.
     */
    public static final String KEY_SCALE_TYPE =
            "androidx.browser.trusted.KEY_SPLASH_SCREEN_SCALE_TYPE";

    /**
     * The transformation matrix to apply to the image on the splash screen. See
     * {@link android.widget.ImageView#setImageMatrix}. Only needs to be provided if the scale
     * type is {@link android.widget.ImageView.ScaleType#MATRIX}.
     * The value must be an array of 9 floats or null. This array can be retrieved from
     * {@link android.graphics.Matrix#getValues(float[])}. The default is null.
     */
    public static final String KEY_IMAGE_TRANSFORMATION_MATRIX =
            "androidx.browser.trusted.KEY_SPLASH_SCREEN_TRANSFORMATION_MATRIX";

    /**
     * The duration of fade out animation in milliseconds to be played when removing splash
     * screen.
     * The value must be provided as an int. The default is 0 (no animation).
     */
    public static final String KEY_FADE_OUT_DURATION_MS =
            "androidx.browser.trusted.KEY_SPLASH_SCREEN_FADE_OUT_DURATION";

    private SplashScreenParamKey() {}
}