SplashView - OneUIProject/OneUI-Design-Library GitHub Wiki

de.dlyt.yanndroid.oneui.layout.SplashView

The activity you are gonna use for SplashView has a different style than the rest of the application, so you need to add this android:theme="@style/OneUISplashTheme" to your splash activity in AndroidManifest.

This view comes in two different configurations:

1.

An animated Splash Screen View like the one in the Galaxy Store.

<de.dlyt.yanndroid.oneui.layout.SplashView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:animated="true"
    app:text="..."
    app:background_image="..."
    app:foreground_image="..."
    app:animation="..." />

Set app:background_image to the background part of your icon and app:foreground_image to the foreground. The foreground image will have a customizable animation via the app:animation attr (default animation will be Galaxy Store one). app:text="..." is the text under the icon. It has a custom font to match the one on the Galaxy Store splash screen.

Methods

Sets the icon foreground and background

public void setImage(Drawable foreground, Drawable background)

Sets the text of the Splash TextView

public void setText(String mText)

Returns the text of the Splash TextView

public String getText()

Starts the animation of the foreground

public void startSplashAnimation()

Clears the animation

public void clearSplashAnimation()

Listener for the Splash Animation

public void setSplashAnimationListener(Animation.AnimationListener listener)

2.

A simple Splash View without animation. (Samsung apps use their own com.samsung.android.startingwindow.LAYOUT_RESID_FOR_MASS flag in manifest)

<de.dlyt.yanndroid.oneui.layout.SplashView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:animated="false"
    app:text="..."
    app:image="..." />

Set the icon and text in app:image and app:text.

Methods

Sets the icon Drawable

public void setImage(Drawable mImage)

Sets the text of the Splash TextView

public void setText(String mText)

Returns the text of the Splash TextView

public String getText()