GithubHelp home page GithubHelp logo

awesomesplash's Introduction

AwesomeSplash

Android Arsenal

Awesome-looking customizable splash screen

Splash screens have been around for quite a while. It's the first thing the users see when they run your app, so make it simple yet eventful and impressionable. This library does exactly that, provides you with beautiful template screen, with wide range of customizations to fit your concept of the splash screen. To be noted, with the last acknowledgement form google that splash screens got, having a library that tackles this issue is kind of necessity.

Ready to see implementation details? Let's scroll.

Demo

What the library is capable of is shown in this youtube video:

ScreenShot

You can download the demo app [here] (https://github.com/ViksaaSkool/AwesomeSplash/blob/master/rdme/awesome_splash_demo.apk?raw=true)

Prerequisites/Credits

This library is based and utilizes 3 great libraries:

So before diving into AwesomeSplash library, look into the libraries. Especially make sure you understand the concept of SVG path and look deeply on how to create you custom svg (and get the string values needed for AwesomeSplash).

Usage

Add this to your settings.gradle:

	repositories {
	    //...
            maven { url "https://jitpack.io" }
    }

and then in dependencies:

	dependencies {
	        implementation 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
	}

Here is how you utilize the library in your Kotlin code:

//extends AwesomeSplash!
class YourActivity : AwesomeSplash() {

	//DO NOT OVERRIDE onCreate()!
	//if you need to start some services do it in initSplash()!

	override fun initSplash(configSplash: ConfigSplash?) {

        /* you don't have to override every property */

        configSplash?.let {
            //Customize Circular Reveal
            it.backgroundColor = R.color.purple_500 //any color you want from colors.xml
            it.animCircularRevealDuration = 2000 //int ms
            it.revealFlagX = Flags.REVEAL_RIGHT  //or Flags.REVEAL_LEFT
            it.revealFlagY = Flags.REVEAL_BOTTOM //or Flags.REVEAL_TOP

            //Choose LOGO OR PATH; if you don't provide String value for path it's logo by default

            //Customize Logo
            it.logoSplash = R.mipmap.ic_launcher //or any other drawable
            it.animLogoSplashDuration = 3000 //int ms
            it.animLogoSplashTechnique = Techniques.Bounce //choose one form Techniques (ref: https://github.com/daimajia/AndroidViewAnimations)

            //Customize Path
            it.pathSplash = Constants.DROID_LOGO //set path String
            it.originalHeight = 400 //in relation to your svg (path) resource
            it.originalWidth = 400 //in relation to your svg (path) resource
            it.animPathStrokeDrawingDuration = 3000
            it.pathSplashStrokeSize = 3 //I advise value be <5
            it.pathSplashStrokeColor = R.color.teal_200 //any color you want from colors.xml
            it.animPathFillingDuration = 3000
            it.pathSplashFillColor = R.color.white //path object filling color

            //Customize Title
            it.titleSplash = "My Awesome App"
            it.titleTextColor = R.color.white
            it.titleTextSize = 30f //float value
            it.animTitleDuration = 3000
            it.animTitleTechnique = Techniques.Bounce
            it.titleFont = "fonts/myfont.ttf" //provide string to your font located in assets/fonts/
        }

    }

    override fun animationsFinished() {
        //transit to another activity here
        //or do whatever you want
    }
    
}

Here is how you utilize the library in your Java code:

//extends AwesomeSplash!
public class YourActivity extends AwesomeSplash {

	//DO NOT OVERRIDE onCreate()!
	//if you need to start some services do it in initSplash()!

	@Override
	public void initSplash(ConfigSplash configSplash) {

		/* you don't have to override every property */

		//Customize Circular Reveal
		configSplash.setBackgroundColor(R.color.purple_500); //any color you want form colors.xml
		configSplash.setAnimCircularRevealDuration(2000); //int ms
		configSplash.setRevealFlagX(Flags.REVEAL_RIGHT);  //or Flags.REVEAL_LEFT
		configSplash.setRevealFlagY(Flags.REVEAL_BOTTOM); //or Flags.REVEAL_TOP

		//Choose LOGO OR PATH; if you don't provide String value for path it's logo by default

		//Customize Logo
		configSplash.setLogoSplash(R.mipmap.ic_launcher); //or any other drawable
		configSplash.setAnimLogoSplashDuration(2000); //int ms
		configSplash.setAnimLogoSplashTechnique(Techniques.Bounce); //choose one form Techniques (ref: https://github.com/daimajia/AndroidViewAnimations)

		//Customize Path
		configSplash.setPathSplash(Constants.DROID_LOGO); //set path String
		configSplash.setOriginalHeight(400); //in relation to your svg (path) resource
		configSplash.setOriginalWidth(400); //in relation to your svg (path) resource
		configSplash.setAnimPathStrokeDrawingDuration(3000);
		configSplash.setPathSplashStrokeSize(3); //I advise value be <5
		configSplash.setPathSplashStrokeColor(R.color.accent); //any color you want form colors.xml
		configSplash.setAnimPathFillingDuration(3000);
		configSplash.setPathSplashFillColor(R.color.Wheat); //path object filling color

		//Customize Title
		configSplash.setTitleSplash("My Awesome App");
		configSplash.setTitleTextColor(R.color.white);
		configSplash.setTitleTextSize(30f); //float value
		configSplash.setAnimTitleDuration(3000);
		configSplash.setAnimTitleTechnique(Techniques.FlipInX);
		configSplash.setTitleFont("fonts/myfont.ttf"); //provide string to your font located in assets/fonts/

	}

	@Override
	public void animationsFinished() {
		//transit to another activity here
		//or do whatever you want
	}
}

Implemented in

Reiseuhu




CliniShift




If you implement the library in your app(s) and you upload it on Google Play, let me know.

License

The MIT License (MIT)

Copyright (c) 2015 Viktor Arsovski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Developed By

Viktor Arsovski
Add me to Linkedin

awesomesplash's People

Contributors

ahmedmaad avatar viksaaskool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesomesplash's Issues

Could not find com.github.ViksaaSkool:AwesomeSplash:v1.0.0.

Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.github.ViksaaSkool:AwesomeSplash:v1.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/ViksaaSkool/AwesomeSplash/v1.0.0/AwesomeSplash-v1.0.0.pom
- https://repo.maven.apache.org/maven2/com/github/ViksaaSkool/AwesomeSplash/v1.0.0/AwesomeSplash-v1.0.0.pom
- https://jcenter.bintray.com/com/github/ViksaaSkool/AwesomeSplash/v1.0.0/AwesomeSplash-v1.0.0.pom
Required by:
project :app

DROID_LOGO

Why does this keep showing up red and I can't import your constants file?

Logo with ImageView

maybe we can add an ImageView in Logo Splash ( setLogoSplash() ) to this library ?
thanks before. :)

Continuing animation rather than restarting

When the device changes orientation, the animation is restarted.
I've tried to get some values to help me with continuing the animation but there is nothing I can receive the know the current state of the animation, or start the animation in a certain state.

Why not work in Android Studio?

compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
When i run my project in my phone

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

i delete the compile sentence
my project becomes normal

How to remove Textview

Hey buddy,your animation works for me good but its works with a text "Awesome splash" how to remove that text.
screenshot_2016-01-27-10-38-21

Constants

Library doesn't import Constants class. Had to create my own 'DROID_LOGO' string.

title animation does not disappear

hi, I just have this issue that title animation does not disappear even though I set configSplash.setAnimTitleDuration(0); like you've suggested.

the slash title is still there but with no animation...please help

api 4.1 not circular

Hello Mr.Viksaa Skool
I am testing in huawei y300 device and not circular effect.
can you help me.

Thank you.

Project Build Succesfully But not Deploying

Unable to deploy giving this error..

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_20\bin\java.exe'' finished with non-zero exit value 2

Path not working

I tried using path animation using validated SVG Path

"M 25.892,0c-7.646,0-13.845,6.198-13.845,13.845c0,1.494,0.244,2.929,0.68,4.274c0.981,3.461,12.292,33.668,12.292,33.668 s12.014-27.703,13.83-33.096c0.565-1.511,0.891-3.14,0.891-4.848C39.738,6.199,33.539,0,25.892,0z s12.014-27.703,13.83-33.096c0.565-1.511,0.891-3.14,0.891-4.848C39.738,6.199,33.539,0,25.892,0z M 25.892,24.761 c-6,0-10.865-4.867-10.865-10.865c0-6.003,4.865-10.868,10.865-10.868c6.003,0,10.866,4.865,10.866,10.868 C36.758,19.894,31.895,24.761,25.892,24.761z"

but it is not drawing

is it possible to show icon & svg image both?

i use ur library. but if I want to use icon & svg image both. it,s only show svg image & icon size not customizable. Only few anim ar work in icon. and I don't have any access to control svg image like if I want to hidden svg image after anim then show a icon then text it should be more better.
Thanks :)

AwesomeSplash not working after enabling Proguard

When I use Proguard the Splash showed but It bug before showing the next activity.
I get this message :

E/AndroidRuntime: FATAL EXCEPTION: main
                                                   java.lang.Error: Can not init easingMethod instance
                                                       at com.b.b.c.a(Unknown Source)
                                                       at com.b.b.b.a(Unknown Source)
                                                       at com.b.b.b.a(Unknown Source)
                                                       at com.b.a.a.i.a.b.a(Unknown Source)
                                                       at com.b.a.a.a.b(Unknown Source)
                                                       at com.b.a.a.c.a(Unknown Source)
                                                       at com.b.a.a.c.a(Unknown Source)
                                                       at com.b.a.a.c$a.a(Unknown Source)
                                                       at com.e.a.a.a.a.n(Unknown Source)
                                                       at com.e.a.a.a.a$1.a(Unknown Source)
                                                       at com.c.a.a.a(Unknown Source)
                                                       at com.c.a.a.onDraw(Unknown Source)
                                                       at android.view.View.draw(View.java:13806)
                                                       at android.view.View.buildDrawingCache(View.java:13067)
                                                       at android.view.View.getDisplayList(View.java:12736)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.View.draw(View.java:13530)
                                                       at android.view.ViewGroup.drawChild(ViewGroup.java:3228)
                                                       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3093)
                                                       at android.view.View.getDisplayList(View.java:12755)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3210)
                                                       at android.view.View.getDisplayList(View.java:12693)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3210)
                                                       at android.view.View.getDisplayList(View.java:12693)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3210)
                                                       at android.view.View.getDisplayList(View.java:12693)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3210)
                                                       at android.view.View.getDisplayList(View.java:12693)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3210)
                                                       at android.view.View.getDisplayList(View.java:12693)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3210)
                                                       at android.view.View.getDisplayList(View.java:12693)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3210)
                                                       at android.view.View.getDisplayList(View.java:12693)
                                                       at android.view.View.getDisplayList(View.java:12801)
                                                       at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1144)
                                                       at android.view.ViewRootImpl.draw(ViewRootImpl.java:2278)
                                                       at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2150)
                                                       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1961)
                                                       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1115)
                                                       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4538)
                                                       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
                                                       at android.view.Choreographer.doCallbacks(Choreographer.java:555)
                                                       at android.view.Choreographer.doFrame(Choreographer.java:525)
                                                       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
                                                       at android.os.Handler.handleCallback(Handler.java:615)
                                                       at android.os.Handler.dispatchMessage(Handler.java:92)
                                                       at android.os.Looper.loop(Looper.java:137)
                                                       at android.app.ActivityThread.main(ActivityThread.java:4921)
                                                       at java.lang.reflect.Method.invokeNative(Native Method)
                                                       at java.lang.reflect.Method.invoke(Method.java:511)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
                                                       at dalvik.system.NativeStart.main(Native Method)

Could you help me ?
thanks in advance

java.lang.NoSuchMethodError: No virtual method withListener

I get this error immediately after the circular reveal completes in the emulator.
FATAL EXCEPTION: main Process: com.example.erfan.splash, PID: 7531 java.lang.NoSuchMethodError: No virtual method withListener(Lcom/nineoldandroids/animation/Animator$AnimatorListener;)Lcom/daimajia/androidanimations/library/YoYo$AnimationComposer; in class Lcom/daimajia/androidanimations/library/YoYo$AnimationComposer; or its super classes (declaration of 'com.daimajia.androidanimations.library.YoYo$AnimationComposer' appears in /data/app/com.example.erfan.splash-1/split_lib_dependencies_apk.apk:classes3.dex) at com.viksaa.sssplash.lib.activity.AwesomeSplash.startLogoAnimation(AwesomeSplash.java:169) at com.viksaa.sssplash.lib.activity.AwesomeSplash$2.onAnimationEnd(AwesomeSplash.java:156) at io.codetail.animation.SupportAnimatorLollipop$1.onAnimationEnd(SupportAnimatorLollipop.java:75) at android.view.RenderNodeAnimator.onFinished(RenderNodeAnimator.java:381) at android.animation.RevealAnimator.onFinished(RevealAnimator.java:43) at android.view.RenderNodeAnimator.callOnFinished(RenderNodeAnimator.java:488) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:323) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
So as the error suggests, the moment the logo is about to be shown, it crashes out and gives me this error. My friend tested it and it worked fine for him, but when he tested it on my laptop with teamviewer, he had no idea what the problem is.
The error is definitely from inside the AwesomeSplash.java and I would appreciate it if you could lend me hand here.

How to resize the image??

configSplash.setOriginalHeight(400); //in relation to your svg (path) resource
configSplash.setOriginalWidth(400); //in relation to your svg (path) resource

these seem to work only with droid
i need to set the image size of my logo

Image overlay instead of color

The very beginning the screen opens and displays colour based screen background

instead, I wanna make image how do I display?

set margin

could you make function to set margin between logo and text....thanks

Provide support for the latest API level

Hello,
We are currently using your library in one of our application. Actually we need a favour from your side. According to the Google Play Policy, all apps have to provide support for at least API level 26 which is not satisfied in your case. We are targeting API level 28. So can you please provide us support for API level 28 in your current repository?

On Finished method not working!

it goes perfectly right but when it finishes the animation it does't read the codes into on finished method and crashes the app

App crashes when i implemet FabTransitionActivity library(uses same circularreveal parent library)

Any solution to this ?? thanks . link to FabTransitionActivity library

FATAL EXCEPTION: main
Process: main.natty.android.welltech.welltechcoolingsystems, PID: 5669
java.lang.NoSuchMethodError: No virtual method setInterpolator(Landroid/view/animation/Interpolator;)V in class Lio/codetail/animation/SupportAnimator; or its super classes (declaration of 'io.codetail.animation.SupportAnimator' appears in /data/app/main.natty.android.welltech.welltechcoolingsystems-2/split_lib_dependencies_apk.apk:classes17.dex)
at com.viksaa.sssplash.lib.activity.AwesomeSplash.startCircularReveal(AwesomeSplash.java:135)
at com.viksaa.sssplash.lib.activity.AwesomeSplash.onWindowFocusChanged(AwesomeSplash.java:89)
at android.support.v7.view.WindowCallbackWrapper.onWindowFocusChanged(WindowCallbackWrapper.java:128)
at com.android.internal.policy.DecorView.onWindowFocusChanged(DecorView.java:1451)
at android.view.View.dispatchWindowFocusChanged(View.java:10257)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1193)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3602)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

Util package not found / Constants.DROID_LOGO

I want to "import com.viksaa.sssplash.util.Constants;" but there is no util package, the other imports are found. is there a problem with the version of the app, because I used two version and none of them is working. I am using Android Studio 3.

Update readme

In new Android versions there is no "All projects" section in the "build.gradle" file, so all you have to do is to open "settings.gradle" file inside the gradle scripts, and add your maven { url "https://jitpack.io" } like this

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://jitpack.io" }
}
}

problem in using.

How to call this class from outside activity,what to pass in initSplash parameter,it require type config?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.