Skip to content
This repository was archived by the owner on Sep 26, 2020. It is now read-only.

Repository files navigation

IntroScreen

swiggy like intro screen

Developed with ❤️ by FoodBee

Support by clicking the ⭐ button on the upper right of this page. ✌️

Setup

Follow the Installation Instructions to set it up.

working

Installation

Add Jitpack repository in your root build.gradle file:

allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}

add the dependency to your app:

dependencies {
implementation 'com.github.foodbee:IntroScreen:(latest-version)'
}

And then in your intro screen activity add it like this

import`in`.foodbee.intro_screen.IntroActivityimportandroid.os.Bundleimportandroidx.core.content.ContextCompat// your activity should extend IntroActivity and should not have any setContentView method just like belowclassMainActivity : IntroActivity() {
overridefunonCreate(savedInstanceState:Bundle?) {
super.onCreate(savedInstanceState)
// add your resources in stringsval titleArray = arrayOf(
getString(R.string.slide_1_title), getString(R.string.slide_2_title),
getString(R.string.slide_3_title)
)
// add your images in drawableval imageArray = arrayOf(
getDrawable(R.drawable.slide_1_image),
getDrawable(R.drawable.slide_2_image),
getDrawable(R.drawable.slide_3_image)
)
// add dot inactive and active screen colorsval dotInActiveColor =ContextCompat.getColor(this, R.color.dot_inactive)
val dotActiveColor =ContextCompat.getColor(this, R.color.colorAccent)
// subtitle text is common to all screensval subtitleText = getString(R.string.ready_to_order_from_your_favourite_restaurants)
// call this method and see the magic in your app, it calls my code and displays the slider
initSlide(titleArray, imageArray, subtitleText, dotInActiveColor, dotActiveColor)
binding.getStartedBtn.setOnClickListener {
//implement the getstarted button click action here
}
}
}

Design credits: Swiggy Assets source: Internet

About

🍔 Our Cool Swiggy like Intro Screen Android library

Topics

Resources

Stars

27 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages