├── app
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── drawable
│ │ │ ├── img1.jpeg
│ │ │ ├── img01.jpeg
│ │ │ ├── img02.jpeg
│ │ │ ├── img03.jpeg
│ │ │ ├── img04.jpeg
│ │ │ ├── img05.jpeg
│ │ │ ├── round_chip.xml
│ │ │ ├── round_black_chip.xml
│ │ │ ├── round_background_softgrey.xml
│ │ │ ├── ic_round_back.xml
│ │ │ └── ic_launcher_background.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── drawable-hdpi
│ │ │ └── ic_action_name.png
│ │ ├── drawable-mdpi
│ │ │ └── ic_action_name.png
│ │ ├── drawable-xhdpi
│ │ │ └── ic_action_name.png
│ │ ├── drawable-xxhdpi
│ │ │ └── ic_action_name.png
│ │ ├── drawable-xxxhdpi
│ │ │ └── ic_action_name.png
│ │ ├── values
│ │ │ ├── preloaded_fonts.xml
│ │ │ ├── dimens.xml
│ │ │ ├── colors.xml
│ │ │ ├── integers.xml
│ │ │ ├── styles.xml
│ │ │ ├── strings.xml
│ │ │ └── font_certs.xml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── anim
│ │ │ ├── fade_in.xml
│ │ │ ├── slide_in_top.xml
│ │ │ ├── slide_in_bottom.xml
│ │ │ ├── slide_in_left.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_bottom.xml
│ │ │ ├── slide_out_left.xml
│ │ │ ├── slide_out_right.xml
│ │ │ └── slide_out_top.xml
│ │ ├── font
│ │ │ └── audiowide.xml
│ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── layout
│ │ │ └── activity_main.xml
│ │ └── raw
│ │ │ ├── play_to_stop_animation.json
│ │ │ ├── stop_to_play_animation.json
│ │ │ └── autoplay_animation.json
│ │ ├── java
│ │ └── com
│ │ │ └── av
│ │ │ └── smoothslider
│ │ │ ├── DemoDataModel.kt
│ │ │ ├── DemoUtils.kt
│ │ │ └── MainActivity.kt
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── smoothviewpager
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ └── colors.xml
│ │ ├── drawable
│ │ │ └── round_chip.xml
│ │ └── layout
│ │ │ └── smoolider_item_view.xml
│ │ └── java
│ │ └── com
│ │ └── av
│ │ └── smoothviewpager
│ │ ├── smoolider
│ │ ├── PageModel.kt
│ │ ├── SmoothPagerAdapter.kt
│ │ └── SmoothViewpager.kt
│ │ └── utils
│ │ ├── FixedSpeedScroller.kt
│ │ ├── TextFactory.kt
│ │ ├── CardsPagerTransformerBasic.kt
│ │ └── SmooliderUtils.kt
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .idea
├── encodings.xml
├── compiler.xml
├── vcs.xml
├── gradle.xml
├── misc.xml
└── jarRepositories.xml
├── .gitignore
├── .circleci
└── config.yml
├── LICENSE
├── gradle.properties
├── gradlew.bat
├── README.md
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/smoothviewpager/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':smoothviewpager'
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable/img1.jpeg
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img01.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable/img01.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img02.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable/img02.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img03.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable/img03.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img04.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable/img04.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img05.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable/img05.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable-hdpi/ic_action_name.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable-mdpi/ic_action_name.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable-xhdpi/ic_action_name.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_name.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/drawable-xxxhdpi/ic_action_name.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/smoothviewpager/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/astrit-veliu/Smoolider/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SmoothViewPager
3 | Click the pin for more options
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/java/com/av/smoothslider/DemoDataModel.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothslider
2 |
3 | /**
4 | * Created by Astrit Veliu on 06, October, 2021
5 | */
6 | data class DemoDataModel(val name: Int, val description: Int, val url: Int)
--------------------------------------------------------------------------------
/app/src/main/res/values/preloaded_fonts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @font/audiowide
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_chip.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_black_chip.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/res/drawable/round_chip.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Sep 06 11:58:18 CEST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 32dp
6 | 148dp
7 |
8 |
9 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/java/com/av/smoothviewpager/smoolider/PageModel.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothviewpager.smoolider
2 |
3 | /**
4 | * Created by Astrit Veliu on 06, October, 2021
5 | */
6 | data class PageModel(
7 | val imageUrl: String? = null,
8 | val imageResource: Int? = null,
9 | val descriptionChipText: String? = null,
10 | val data: Any? = null
11 | )
--------------------------------------------------------------------------------
/app/src/main/res/font/audiowide.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #E6000000
6 | #E6000000
7 | #F5F6F7
8 | #FFFFFF
9 | #A7A7A7
10 | #fbfbfd
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #E6000000
6 | #E6000000
7 | #F5F6F7
8 | #FFFFFF
9 | #A7A7A7
10 | #fbfbfd
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_background_softgrey.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
9 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/java/com/av/smoothviewpager/utils/FixedSpeedScroller.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothviewpager.utils
2 |
3 | import android.content.Context
4 | import android.widget.Scroller
5 |
6 | /**
7 | * Created by Astrit Veliu on 09,September,2019
8 | * updated on 06, October, 2021
9 | */
10 | class FixedSpeedScroller@JvmOverloads constructor(context: Context) : Scroller(context) {
11 |
12 | private val mDuration = 1500
13 |
14 | override fun startScroll(startX: Int, startY: Int, dx: Int, dy: Int, duration: Int) {
15 | super.startScroll(startX, startY, dx, dy, mDuration)
16 | }
17 |
18 | override fun startScroll(startX: Int, startY: Int, dx: Int, dy: Int) {
19 | super.startScroll(startX, startY, dx, dy, mDuration)
20 | }
21 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_round_back.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/smoothviewpager/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | 400
15 | 350
16 | 650
17 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/java/com/av/smoothviewpager/utils/TextFactory.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothviewpager.utils
2 |
3 | import android.content.Context
4 | import androidx.annotation.StyleRes
5 | import android.widget.TextView
6 | import android.view.Gravity
7 | import android.view.View
8 | import android.widget.ViewSwitcher.ViewFactory
9 | import androidx.core.widget.TextViewCompat
10 |
11 | /**
12 | * Created by Astrit Veliu on 09,September,2019
13 | * updated on 06, October, 2021
14 | */
15 | class TextFactory(@StyleRes val styleId: Int, private val center: Boolean, private val mContext: Context) : ViewFactory {
16 |
17 | override fun makeView(): View {
18 | val textView = TextView(mContext)
19 | textView.apply {
20 | if (center) gravity = Gravity.CENTER
21 | TextViewCompat.setTextAppearance(this, styleId)
22 | }.also { return it }
23 | }
24 | }
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | # Java Gradle CircleCI 2.0 configuration file
2 | #
3 | # Check https://circleci.com/docs/2.0/language-java/ for more details
4 | #
5 | version: 2
6 | jobs:
7 | build:
8 | working_directory: ~/code
9 | docker:
10 | - image: circleci/android:api-28-alpha
11 | environment:
12 | JVM_OPTS: -Xmx3200m
13 | steps:
14 | - checkout
15 | - restore_cache:
16 | key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
17 | - run:
18 | name: Chmod permissions
19 | command: sudo chmod +x ./gradlew
20 | - run:
21 | name: Download Dependencies
22 | command: ./gradlew androidDependencies
23 | - save_cache:
24 | paths:
25 | - ~/.gradle
26 | key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
27 | - run:
28 | name: Run Tests
29 | command: ./gradlew lint test
30 | - store_artifacts:
31 | path: app/build/reports
32 | destination: reports
33 | - store_test_results:
34 | path: app/build/test-results
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Astrit Veliu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/java/com/av/smoothviewpager/utils/CardsPagerTransformerBasic.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothviewpager.utils
2 |
3 | import android.os.Build.VERSION
4 | import android.os.Build.VERSION_CODES
5 | import android.view.View
6 | import androidx.viewpager.widget.ViewPager.PageTransformer
7 | import kotlin.math.abs
8 |
9 | /**
10 | * Created by Astrit Veliu on 09,September,2019
11 | * updated on 06, October, 2021
12 | */
13 | class CardsPagerTransformerBasic(
14 | private val baseElevation: Int,
15 | private val raisingElevation: Int,
16 | private val smallerScale: Float
17 | ) : PageTransformer {
18 |
19 | override fun transformPage(page: View, position: Float) {
20 | val absPosition = abs(position)
21 | if (absPosition >= 1) {
22 | if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) page.elevation = baseElevation.toFloat()
23 | page.scaleY = smallerScale
24 | } else {
25 | if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) page.elevation = (1 - absPosition) * raisingElevation + baseElevation
26 | page.scaleY = (smallerScale - 1) * absPosition + 1
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/smoothviewpager/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.library'
3 | id 'kotlin-android'
4 | }
5 |
6 | android {
7 | compileSdkVersion 31
8 |
9 | defaultConfig {
10 | minSdkVersion 15
11 | targetSdkVersion 31
12 | versionCode 2
13 | versionName "1.1"
14 | }
15 |
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 |
23 | buildFeatures{
24 | dataBinding true
25 | viewBinding true
26 | }
27 |
28 | kotlinOptions {
29 | jvmTarget = JavaVersion.VERSION_1_8.toString()
30 | freeCompilerArgs += ["-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi"]
31 | }
32 |
33 | compileOptions {
34 | sourceCompatibility JavaVersion.VERSION_1_8
35 | targetCompatibility JavaVersion.VERSION_1_8
36 | }
37 | }
38 |
39 | dependencies {
40 | implementation fileTree(dir: 'libs', include: ['*.jar'])
41 |
42 | implementation "com.github.astrit-veliu:Boom:$_boom_version"
43 | implementation "com.rishabhharit.roundedimageview:RoundedImageView:$_roundedimageview_version"
44 | implementation 'androidx.appcompat:appcompat:1.3.1'
45 | implementation 'com.github.bumptech.glide:glide:4.12.0'
46 | annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
47 | implementation "androidx.core:core-ktx:1.6.0"
48 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
49 | }
50 | repositories {
51 | mavenCentral()
52 | }
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/av/smoothslider/DemoUtils.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothslider
2 |
3 | import com.av.smoothviewpager.smoolider.PageModel
4 |
5 | private val titles = intArrayOf(R.string.title_1, R.string.title_2, R.string.title_3, R.string.title_4, R.string.title_5)
6 | private val descriptions = intArrayOf(
7 | R.string.description_1, R.string.description_2, R.string.description_3, R.string.description_4,
8 | R.string.description_5
9 | )
10 | private val pics = intArrayOf(R.drawable.img01, R.drawable.img02, R.drawable.img03, R.drawable.img04, R.drawable.img05)
11 | private val url = intArrayOf(R.string.position_1, R.string.position_2, R.string.position_3, R.string.position_4, R.string.position_5)
12 | private val chipTexts = arrayOf("S 65", "400 4Matic", "GT 63S", "G 63", "C 63S")
13 |
14 | fun getDemoData(): List {
15 | val pagesList: MutableList = mutableListOf()
16 | pics.forEachIndexed { index, image ->
17 | val dataModel = DemoDataModel(titles[index], descriptions[index], url[index])
18 | pagesList.add(
19 | PageModel(
20 | imageResource = image,
21 | descriptionChipText = chipTexts[index],
22 | data = dataModel
23 | )
24 | )
25 | }
26 | return pagesList
27 | }
28 |
29 | fun getSinglePage(): PageModel {
30 | val index = (0..4).random()
31 | val dataModel = DemoDataModel(titles[index], descriptions[index], url[index])
32 | return PageModel(
33 | imageResource = pics[index],
34 | descriptionChipText = chipTexts[index],
35 | data = dataModel
36 | )
37 | }
38 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/java/com/av/smoothviewpager/utils/SmooliderUtils.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothviewpager.utils
2 |
3 | import android.content.Context
4 | import android.graphics.Bitmap
5 | import android.graphics.BitmapFactory
6 | import android.widget.Toast
7 | import android.content.Intent
8 | import android.graphics.BitmapFactory.Options
9 | import android.net.Uri
10 | import kotlin.math.roundToInt
11 |
12 | /**
13 | * Created by Astrit Veliu on 09,September,2019
14 | * updated on 06, October, 2021
15 | */
16 |
17 | fun Context.openWebPage(url: String) {
18 | if (url.equals("", ignoreCase = true) || url.isEmpty()) {
19 | Toast.makeText(this, "Bad url", Toast.LENGTH_SHORT).show()
20 | } else {
21 | val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
22 | browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
23 | startActivity(browserIntent)
24 | }
25 | }
26 |
27 | fun Context.decodeSampledBitmapFromResource(resourceId: Int, width: Int, height: Int): Bitmap {
28 | val options = Options()
29 | options.inJustDecodeBounds = true
30 | BitmapFactory.decodeResource(resources, resourceId, options)
31 | options.inSampleSize = calculateInSampleSize(options, width, height)
32 | options.inJustDecodeBounds = false
33 | return BitmapFactory.decodeResource(resources, resourceId, options)
34 | }
35 |
36 | private fun calculateInSampleSize(options: Options, reqWidth: Int, reqHeight: Int): Int {
37 | val stretchWidth = (options.outWidth.toFloat() / reqWidth.toFloat()).roundToInt()
38 | val stretchHeight = (options.outHeight.toFloat() / reqHeight.toFloat()).roundToInt()
39 | return if (stretchWidth <= stretchHeight) stretchHeight else stretchWidth
40 | }
--------------------------------------------------------------------------------
/smoothviewpager/src/main/res/layout/smoolider_item_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
16 |
17 |
25 |
26 |
27 |
28 |
47 |
48 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'kotlin-android'
4 | }
5 | android {
6 | compileSdkVersion 31
7 |
8 | defaultConfig {
9 | applicationId "com.av.smoothslider"
10 | minSdkVersion 16
11 | targetSdkVersion 31
12 | versionCode 2
13 | versionName "1.1"
14 | vectorDrawables.useSupportLibrary = true
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 |
23 | buildFeatures{
24 | dataBinding true
25 | viewBinding true
26 | }
27 |
28 | kotlinOptions {
29 | jvmTarget = JavaVersion.VERSION_1_8.toString()
30 | freeCompilerArgs += ["-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi"]
31 | }
32 |
33 | compileOptions {
34 | sourceCompatibility JavaVersion.VERSION_1_8
35 | targetCompatibility JavaVersion.VERSION_1_8
36 | }
37 | }
38 |
39 | dependencies {
40 | implementation fileTree(dir: 'libs', include: ['*.jar'])
41 | implementation "androidx.appcompat:appcompat:$_appcompatx_version"
42 | implementation "androidx.constraintlayout:constraintlayout:$_constraintlayout_version"
43 | implementation "com.squareup.retrofit2:converter-gson:$_gson_version"
44 | implementation "com.google.android.material:material:$_material_version"
45 | implementation "com.rishabhharit.roundedimageview:RoundedImageView:$_roundedimageview_version"
46 | implementation "com.airbnb.android:lottie:$_lottie_version"
47 | implementation project(path: ':smoothviewpager')
48 | implementation "com.github.astrit-veliu:Boom:$_boom_version"
49 | implementation "androidx.core:core-ktx:1.6.0"
50 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
51 | }
52 | repositories {
53 | mavenCentral()
54 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Smooth Slider
3 |
4 | "S-Class"
5 | "The EQC"
6 | "AMG GT"
7 | "G-Class"
8 | "C-Class"
9 |
10 | "The limited-edition special S 65 Final Edition model from Mercedes-AMG marks the pinnacle of the 6.0-litre V12 biturbo engine’s long success story on board the S-Class Saloon"
11 | "The first fully electric Mercedes-Benz combines minimalistic design with performance and fun driving properties – all with zero local emissions. Describing the EQC in one word? Quite a challenge"
12 | "More space, more power, more goose pimples – the new Mercedes-AMG GT 4-door model delivers driving experiences in new dimensions and extends the AMG model family."
13 | "The sporty STRONGER THAN TIME Edition. One of the six sporty exclusive finishes from G manufaktur. Inside, enjoy the Nappa leather in titanium grey pearl"
14 | "The C 63 S is the bedrock of Mercedes-AMG. Drivers and fans love it because it is one of a kind in its segment. Its signature feature is the immensely powerful eight-cylinder engine "
15 |
16 | "https://www.mercedes-benz.com/en/vehicles/passenger-cars/s-class/mercedes-amg-s-65-final-edition/"
17 | "https://www.mercedes-benz.com/en/eq/eqc/the-eqc-2019-in-just-one-word/"
18 | "https://www.mercedes-benz.com/en/mbsocialcar/mbsocialcar-mercedes-amg-gt-63-s-4matic/"
19 | "https://www.mercedes-benz.com/en/vehicles/passenger-cars/g-class/"
20 | "https://www.mercedes-benz.com/en/vehicles/passenger-cars/c-class/mercedes-amg-c-63-s-coupe-driving-fun/"
21 |
22 | Click the pin for more options
23 | %1$d / %2$d
24 |
25 |
26 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/java/com/av/smoothviewpager/smoolider/SmoothPagerAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothviewpager.smoolider
2 |
3 | import android.content.Context
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import androidx.core.view.isVisible
8 | import androidx.viewpager.widget.PagerAdapter
9 | import com.av.smoothviewpager.databinding.SmooliderItemViewBinding
10 | import com.av.smoothviewpager.utils.decodeSampledBitmapFromResource
11 | import com.bumptech.glide.Glide
12 |
13 | /**
14 | * Created by Astrit Veliu on 06, October, 2021
15 | */
16 | class SmoothPagerAdapter(private val mContext: Context) : PagerAdapter() {
17 |
18 | private var feedItemList: List? = null
19 |
20 | private var onItemSelected: ((selectedItem: PageModel?) -> Unit)? = null
21 |
22 | override fun instantiateItem(container: ViewGroup, position: Int): View {
23 | val currentItem = feedItemList?.get(position)
24 | val binding = SmooliderItemViewBinding.inflate(LayoutInflater.from(mContext), container, false)
25 | binding.detailsChipTextView.isVisible = currentItem?.descriptionChipText != null
26 | currentItem?.descriptionChipText?.let { binding.detailsChipTextView.text = it }
27 | currentItem?.imageResource?.let { imageId ->
28 | binding.cardImageView.setImageBitmap(mContext.decodeSampledBitmapFromResource(imageId, 800, 650))
29 | }
30 | currentItem?.imageUrl?.let { imageUrl -> Glide.with(mContext).load(imageUrl).into(binding.cardImageView) }
31 | binding.root.setOnClickListener { onItemSelected?.invoke(currentItem) }
32 | container.addView(binding.root)
33 | return binding.root
34 | }
35 |
36 | fun setPages(feedItemList: List?){
37 | this.feedItemList = feedItemList
38 | notifyDataSetChanged()
39 | }
40 |
41 | override fun getCount(): Int = feedItemList?.size ?: 0
42 |
43 | override fun destroyItem(container: ViewGroup, position: Int, item: Any) {
44 | container.removeView(item as View)
45 | }
46 |
47 | override fun isViewFromObject(view: View, itemObject: Any): Boolean = view == itemObject
48 |
49 | override fun getItemPosition(`object`: Any): Int = POSITION_NONE
50 |
51 | fun setOnItemSelected(onItemSelected: ((selectedItem: PageModel?) -> Unit)?) {
52 | this.onItemSelected = onItemSelected
53 | }
54 | }
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/app/src/main/res/values/font_certs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @array/com_google_android_gms_fonts_certs_dev
5 | - @array/com_google_android_gms_fonts_certs_prod
6 |
7 |
8 | -
9 | MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs=
10 |
11 |
12 |
13 | -
14 | MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
23 |
24 |
31 |
32 |
45 |
46 |
57 |
58 |
68 |
69 |
74 |
75 |
76 |
77 |
94 |
95 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/app/src/main/java/com/av/smoothslider/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothslider
2 |
3 | import android.os.Bundle
4 | import android.view.View
5 | import android.view.animation.AnimationUtils
6 | import androidx.appcompat.app.AppCompatActivity
7 | import androidx.appcompat.app.AppCompatDelegate
8 | import com.google.android.material.snackbar.Snackbar
9 | import com.astritveliu.boom.utils.BoomUtils
10 | import com.av.smoothslider.R.anim
11 | import com.av.smoothslider.R.style
12 | import com.av.smoothslider.databinding.ActivityMainBinding
13 | import com.av.smoothviewpager.smoolider.PageModel
14 | import com.av.smoothviewpager.utils.TextFactory
15 | import com.av.smoothviewpager.utils.openWebPage
16 |
17 | /**
18 | * Created by Astrit Veliu on 09,September,2019
19 | * * updated on 06, October, 2021
20 | */
21 | class MainActivity : AppCompatActivity() {
22 |
23 | private lateinit var binding: ActivityMainBinding
24 |
25 | private var isAutoplay = false
26 | private var currentPosition = 0
27 |
28 | override fun onCreate(savedInstanceState: Bundle?) {
29 | super.onCreate(savedInstanceState)
30 | binding = ActivityMainBinding.inflate(layoutInflater)
31 | setContentView(binding.root)
32 | AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
33 | initWidgets()
34 | binding.viewpager.setAdapter(getDemoData())
35 | binding.viewpager.setOnPageClick { page ->
36 | binding.viewpager.removePage(page)
37 | }
38 | binding.viewpager.setOnPageSelected { position, page ->
39 | manageWidgetsOnSwipe(position, page)
40 | }
41 | binding.animationView.setOnClickListener { view ->
42 | manageAutoplay()
43 | Snackbar.make(view, " ▶ Autoplay : $isAutoplay", Snackbar.LENGTH_LONG).show()
44 | }
45 | binding.githubImageView.setOnClickListener { openWebPage("https://github.com/astrit-veliu") }
46 |
47 | binding.titleTextView.setOnClickListener {
48 | binding.viewpager.addPage(getSinglePage())
49 | }
50 | }
51 |
52 | private fun initWidgets() {
53 | supportActionBar?.hide()
54 | BoomUtils.boomAll(binding.titleTextView, binding.subTitleTextView)
55 | binding.positionTextSwitcher.setFactory(TextFactory(style.CustomTextView, true, applicationContext))
56 | }
57 |
58 | private fun manageWidgetsOnSwipe(position: Int, page: PageModel) {
59 | page.data?.let { selectedData ->
60 | if (selectedData is DemoDataModel) {
61 | val animH = intArrayOf(anim.slide_in_right, anim.slide_out_left)
62 | val animV = intArrayOf(anim.slide_in_top, anim.slide_out_bottom)
63 | val left2right = position < currentPosition
64 | if (left2right) {
65 | animH[0] = anim.slide_in_left
66 | animH[1] = anim.slide_out_right
67 | animV[0] = anim.slide_in_bottom
68 | animV[1] = anim.slide_out_top
69 | }
70 | binding.positionTextSwitcher.setInAnimation(this@MainActivity, animH[0])
71 | binding.positionTextSwitcher.setOutAnimation(this@MainActivity, animH[1])
72 | binding.positionTextSwitcher.setText(
73 | applicationContext.getString(R.string.position_text, (position + 1), binding.viewpager.getItemCount())
74 | )
75 | binding.titleTextView.visibility = View.INVISIBLE
76 | binding.titleTextView.startAnimation(AnimationUtils.loadAnimation(applicationContext, anim.fade_in))
77 | binding.titleTextView.visibility = View.VISIBLE
78 | binding.titleTextView.setText(selectedData.name)
79 | binding.subTitleTextView.visibility = View.INVISIBLE
80 | binding.subTitleTextView.startAnimation(AnimationUtils.loadAnimation(applicationContext, anim.fade_in))
81 | binding.subTitleTextView.visibility = View.VISIBLE
82 | binding.subTitleTextView.setText(selectedData.description)
83 | currentPosition = position
84 | }
85 | }
86 | }
87 |
88 | private fun manageAutoplay() {
89 | binding.animationView.playAnimation()
90 | if (isAutoplay) binding.viewpager.stopAutoplayViewPager()
91 | else binding.viewpager.startAutoplay()
92 | isAutoplay = !isAutoplay
93 | }
94 | }
--------------------------------------------------------------------------------
/app/src/main/res/raw/play_to_stop_animation.json:
--------------------------------------------------------------------------------
1 | {"v":"5.2.1","fr":60,"ip":0,"op":60,"w":512,"h":512,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Line 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[241.936,264.704,0],"ix":2},"a":{"a":0,"k":[146.752,131.383,0],"ix":1},"s":{"a":0,"k":[150,150,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[16.688,0],[0,0],[0,-16.688],[0,0],[-16.688,0],[0,0],[0,16.687],[0,0],[-12.918,-7.459],[0,0],[15.343,-8.858],[0,0]],"o":[[0,0],[0,-16.688],[0,0],[-16.688,0],[0,0],[0,16.687],[0,0],[16.688,0],[0,0],[0,-14.916],[0,0],[15.343,8.859],[0,0],[0,0]],"v":[[-36.376,24.547],[-36.376,-53.628],[-66.717,-83.969],[-73.891,-83.969],[-104.232,-53.628],[-104.232,46.524],[-73.891,76.864],[-66.717,76.864],[-36.376,46.524],[-36.376,-64.623],[-7.31,-81.404],[88.889,-25.864],[88.889,13.999],[75.876,21.431]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.905882352941,0.088811994066,0.300289139093,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":17.008,"ix":5},"lc":2,"lj":1,"ml":10,"ml2":{"a":0,"k":10,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[146.752,131.383],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":0,"s":[57.9],"e":[1.5]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":60,"s":[1.5],"e":[1.5]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":90,"s":[1.5],"e":[57.9]},{"t":150}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":0,"s":[100],"e":[55]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":60,"s":[55],"e":[55]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":90,"s":[55],"e":[100]},{"t":150}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":3,"nm":"Trim Paths 2","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":180,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Line 2","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[164.818,132.157,0],"ix":2},"a":{"a":0,"k":[131.865,136.352,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[16.688,0],[0,0],[0,16.687],[0,0],[-16.687,0],[0,0],[0,-16.688],[0,0],[0,0],[7.686,-4.437],[0,0],[0,0],[0,17.716],[0,0],[-5.81,7.666]],"o":[[0,0],[0,16.687],[0,0],[-16.687,0],[0,0],[0,-16.688],[0,0],[16.688,0],[0,0],[0,0],[0.011,18.896],[0,0],[0,0],[-15.344,8.86],[0,0],[0,-10.867],[0,0]],"v":[[101.081,-37.978],[101.081,45.749],[70.74,76.089],[63.565,76.089],[33.225,45.749],[33.225,-54.402],[63.565,-84.743],[70.74,-84.743],[101.081,-54.402],[101.049,-29.728],[101.049,-23.249],[77.822,9.288],[57.809,20.656],[-54.82,84.971],[-89.344,65.04],[-89.344,-65.663],[-79.987,-93.831]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.905882352941,0.088811994066,0.300289139093,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":17.008,"ix":5},"lc":2,"lj":1,"ml":10,"ml2":{"a":0,"k":10,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[131.865,136.352],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":0,"s":[65.1],"e":[3]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":60,"s":[3],"e":[3]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":90,"s":[3],"e":[65.1]},{"t":150}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":0,"s":[100],"e":[49]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":60,"s":[49],"e":[49]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":90,"s":[49],"e":[100]},{"t":150}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":3,"nm":"Trim Paths 2","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":180,"st":0,"bm":0}],"markers":[]}
--------------------------------------------------------------------------------
/app/src/main/res/raw/stop_to_play_animation.json:
--------------------------------------------------------------------------------
1 | {"v":"5.2.1","fr":60,"ip":90,"op":150,"w":512,"h":512,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Line 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[241.936,264.704,0],"ix":2},"a":{"a":0,"k":[146.752,131.383,0],"ix":1},"s":{"a":0,"k":[150,150,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[16.688,0],[0,0],[0,-16.688],[0,0],[-16.688,0],[0,0],[0,16.687],[0,0],[-12.918,-7.459],[0,0],[15.343,-8.858],[0,0]],"o":[[0,0],[0,-16.688],[0,0],[-16.688,0],[0,0],[0,16.687],[0,0],[16.688,0],[0,0],[0,-14.916],[0,0],[15.343,8.859],[0,0],[0,0]],"v":[[-36.376,24.547],[-36.376,-53.628],[-66.717,-83.969],[-73.891,-83.969],[-104.232,-53.628],[-104.232,46.524],[-73.891,76.864],[-66.717,76.864],[-36.376,46.524],[-36.376,-64.623],[-7.31,-81.404],[88.889,-25.864],[88.889,13.999],[75.876,21.431]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.905882352941,0.088811994066,0.300289139093,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":17.008,"ix":5},"lc":2,"lj":1,"ml":10,"ml2":{"a":0,"k":10,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[146.752,131.383],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":0,"s":[57.9],"e":[1.5]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":60,"s":[1.5],"e":[1.5]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":90,"s":[1.5],"e":[57.9]},{"t":150}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":0,"s":[100],"e":[55]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":60,"s":[55],"e":[55]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":90,"s":[55],"e":[100]},{"t":150}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":3,"nm":"Trim Paths 2","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":180,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Line 2","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[164.818,132.157,0],"ix":2},"a":{"a":0,"k":[131.865,136.352,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[16.688,0],[0,0],[0,16.687],[0,0],[-16.687,0],[0,0],[0,-16.688],[0,0],[0,0],[7.686,-4.437],[0,0],[0,0],[0,17.716],[0,0],[-5.81,7.666]],"o":[[0,0],[0,16.687],[0,0],[-16.687,0],[0,0],[0,-16.688],[0,0],[16.688,0],[0,0],[0,0],[0.011,18.896],[0,0],[0,0],[-15.344,8.86],[0,0],[0,-10.867],[0,0]],"v":[[101.081,-37.978],[101.081,45.749],[70.74,76.089],[63.565,76.089],[33.225,45.749],[33.225,-54.402],[63.565,-84.743],[70.74,-84.743],[101.081,-54.402],[101.049,-29.728],[101.049,-23.249],[77.822,9.288],[57.809,20.656],[-54.82,84.971],[-89.344,65.04],[-89.344,-65.663],[-79.987,-93.831]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.905882352941,0.088811994066,0.300289139093,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":17.008,"ix":5},"lc":2,"lj":1,"ml":10,"ml2":{"a":0,"k":10,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[131.865,136.352],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":0,"s":[65.1],"e":[3]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":60,"s":[3],"e":[3]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":90,"s":[3],"e":[65.1]},{"t":150}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":0,"s":[100],"e":[49]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":60,"s":[49],"e":[49]},{"i":{"x":[0.19],"y":[1]},"o":{"x":[0.3],"y":[0]},"n":["0p19_1_0p3_0"],"t":90,"s":[49],"e":[100]},{"t":150}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":3,"nm":"Trim Paths 2","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":180,"st":0,"bm":0}],"markers":[]}
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | SMOOLIDER ⭐
7 |
8 | A smooth slider with a modern UI and effects based on ViewPager. More features coming soon
9 |
10 | ___
11 |
12 | ## Supports ❤
13 | Feel free to give your support by contributing to this library. Buy me a beer!
14 |
15 |
16 |
17 | Follow me on Github for upcoming repositories:
18 |
19 |
20 |
21 |
22 | 
23 | [](https://jitpack.io/#astrit-veliu/Smoolider)
24 | [](https://www.codacy.com/manual/astrit-veliu/Smoolider?utm_source=github.com&utm_medium=referral&utm_content=astrit-veliu/Smoolider&utm_campaign=Badge_Grade)
25 | [](https://circleci.com/gh/astrit-veliu/Smoolider)
26 |
27 |
28 | ## Installation
29 |
30 | ### build.gradle
31 |
32 | Add `jitpack` maven in your root build.gradle at the end of repositories:
33 | ```gradle
34 | allprojects {
35 | repositories {
36 | ...
37 | maven { url 'https://jitpack.io' }
38 | }
39 | }
40 | ```
41 |
42 | Add the dependency to your app `build.gradle` file (not your project build.gradle file).
43 | ```gradle
44 | dependencies {
45 | implementation 'com.github.astrit-veliu:Smoolider:1.2'
46 | }
47 | ```
48 |
49 | ## Usage
50 | `Smoolider` is used the same as a normal ViewPager but more beautiful and with other functionalities. You can use my adapter, or implement a new one.
51 |
52 | ### XML
53 | Include the widget in xml.
54 |
55 | ```xml
56 |
57 |
58 |
65 |
66 | ```
67 |
68 | ### Java
69 | After attaching the adapter to SmoothViewpager you can start/cancel autoplay of slides, adjust the quality of images and interact with other widgets. (See the example for more details)
70 | ```Kotlin
71 | //simply call the setAdapter method with parameter a list of PageModel objects, where you can also add your own object into it
72 | viewpager.setAdapter(getDemoData())
73 | viewpager.setOnPageClick { page ->
74 | viewpager.removePage(page) //will remove the page object from Smoolider and jumps to first postion
75 | viewpager.addPage(page) //will add the page object from Smoolider and jumps to its position
76 | }
77 | viewpager.setOnPageSelected { position, page ->
78 | //here you get the current position and the Page Object in case you want to do some actions with its data
79 | }
80 | ```
81 |
82 | ## 📄 License
83 |
84 | Smoolider is released under the MIT license.
85 | See [LICENSE](./LICENSE) for details.
86 |
87 | ```xml
88 | MIT License
89 |
90 | Copyright (c) 2019 Astrit Veliu
91 |
92 | Permission is hereby granted, free of charge, to any person obtaining a copy
93 | of this software and associated documentation files (the "Software"), to deal
94 | in the Software without restriction, including without limitation the rights
95 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
96 | copies of the Software, and to permit persons to whom the Software is
97 | furnished to do so, subject to the following conditions:
98 |
99 | The above copyright notice and this permission notice shall be included in all
100 | copies or substantial portions of the Software.
101 |
102 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
103 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
104 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
105 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
106 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
107 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
108 | SOFTWARE.
109 | ```
110 |
--------------------------------------------------------------------------------
/smoothviewpager/src/main/java/com/av/smoothviewpager/smoolider/SmoothViewpager.kt:
--------------------------------------------------------------------------------
1 | package com.av.smoothviewpager.smoolider
2 |
3 | import android.content.Context
4 | import android.os.Handler
5 | import android.os.Looper
6 | import android.util.AttributeSet
7 | import androidx.viewpager.widget.ViewPager
8 | import com.av.smoothviewpager.utils.FixedSpeedScroller
9 | import android.util.TypedValue
10 | import com.av.smoothviewpager.utils.CardsPagerTransformerBasic
11 | import java.lang.IllegalArgumentException
12 | import java.lang.reflect.Field
13 | import java.util.Timer
14 | import java.util.TimerTask
15 |
16 | /**
17 | * Created by Astrit Veliu on 09,September,2019
18 | * updated on 06, October, 2021
19 | */
20 | class SmoothViewpager @JvmOverloads constructor(
21 | context: Context,
22 | attrs: AttributeSet? = null
23 | ) : ViewPager(context, attrs) {
24 |
25 | private var onPageClicked: ((page: PageModel) -> Unit)? = null
26 | private var onPageSelected: ((position: Int, page: PageModel) -> Unit)? = null
27 |
28 | private val baseElevation = 0
29 | private val raisingElevation = 1
30 | private val smallerScale = 0.6f
31 | private val viewpagerAdapter = SmoothPagerAdapter(context)
32 | private var items: MutableList? = null
33 |
34 | private var delayMs: Long = 500 //delay in milliseconds before task is to be executed
35 | private var periodMs: Long = 6000 // time in milliseconds between successive task executions.
36 |
37 | private var currentPage = 0
38 | private var timer: Timer? = null
39 |
40 | init {
41 | postInitViewPager()
42 | addOnPageChangeListener(object : OnPageChangeListener {
43 | override fun onPageScrollStateChanged(state: Int) {
44 | //do nothing
45 | }
46 |
47 | override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
48 | //do nothing
49 | }
50 |
51 | override fun onPageSelected(position: Int) {
52 | if (position < items?.size ?: 0) items?.get(position)?.let { onPageSelected?.invoke(position, it) }
53 | }
54 | })
55 | }
56 |
57 | fun setAdapter(itemList: List?) {
58 | if (this.items != itemList) {
59 | this.items = itemList?.toMutableList()
60 | itemList?.let { pages ->
61 | viewpagerAdapter.setPages(pages)
62 | viewpagerAdapter.setOnItemSelected { page -> page?.let { onPageClicked?.invoke(it) } }
63 | adapter = viewpagerAdapter
64 | }
65 | }
66 | this.post { itemList?.firstOrNull()?.let { onPageSelected?.invoke(0, it) } }
67 | }
68 |
69 | fun addPage(page: PageModel) {
70 | items?.add(page)
71 | viewpagerAdapter.setPages(items)
72 | currentItem = getItemCount() - 1
73 | }
74 |
75 | fun removePage(page: PageModel) {
76 | if (items?.contains(page) == true) {
77 | items?.remove(page)
78 | viewpagerAdapter.setPages(items)
79 | if (getItemCount() > 0) currentItem = 0
80 | }
81 | }
82 |
83 | private fun postInitViewPager() {
84 | try {
85 | val viewpager: Class<*> = ViewPager::class.java
86 | val mScroller: Field = viewpager.getDeclaredField("mScroller")
87 | mScroller.isAccessible = true
88 | val scroller = FixedSpeedScroller(context)
89 | mScroller[this] = scroller
90 | transformViewpager()
91 | } catch (e: NoSuchFieldException) {
92 | } catch (e: IllegalArgumentException) {
93 | } catch (e: IllegalAccessException) {
94 | }
95 | }
96 |
97 | private fun transformViewpager() {
98 | val r = resources
99 | val partialWidth = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16f, r.displayMetrics).toInt()
100 | val pageMargin = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 15f, r.displayMetrics).toInt()
101 | val viewPagerPadding = partialWidth + pageMargin
102 | setPageMargin(pageMargin)
103 | setPadding(viewPagerPadding, 0, viewPagerPadding, 0)
104 | setPageTransformer(false, CardsPagerTransformerBasic(baseElevation, raisingElevation, smallerScale))
105 | }
106 |
107 |
108 | fun startAutoplay() {
109 | val handler = Handler(Looper.getMainLooper())
110 | val update = Runnable {
111 | if (currentPage == getItemCount()) {
112 | currentPage = 0
113 | }
114 | setCurrentItem(currentPage++, true)
115 | }
116 | timer = Timer()
117 | timer?.schedule(object : TimerTask() {
118 | override fun run() {
119 | handler.post(update)
120 | }
121 | }, delayMs, periodMs)
122 | }
123 |
124 | fun stopAutoplayViewPager() {
125 | if (timer != null) {
126 | timer?.cancel()
127 | timer = null
128 | }
129 | }
130 |
131 | fun setDelay(value: Long) {
132 | delayMs = value
133 | }
134 |
135 | fun setPeriod(value: Long) {
136 | periodMs = value
137 | }
138 |
139 | fun getItemCount(): Int = items?.size ?: 0
140 |
141 | fun getCurrentPage(): PageModel? = items?.getOrNull(currentItem)
142 |
143 | fun setOnPageClick(onPageClicked: ((page: PageModel) -> Unit)?) {
144 | this.onPageClicked = onPageClicked
145 | }
146 |
147 | fun setOnPageSelected(onPageSelected: ((position: Int, page: PageModel) -> Unit)?) {
148 | this.onPageSelected = onPageSelected
149 | }
150 | }
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/raw/autoplay_animation.json:
--------------------------------------------------------------------------------
1 | {"v":"4.10.0","fr":23.9759979248047,"ip":0,"op":22.9999980092804,"w":500,"h":500,"nm":"loader-7","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[30],"e":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":6,"s":[100],"e":[30]},{"t":9.99999913446976}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[-21.609,-39.609,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":0,"s":[100,100,100],"e":[120,120,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":6,"s":[120,120,100],"e":[100,100,100]},{"t":9.99999913446976}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[50,50],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.18431372549,0.756862745098,0.745098039216,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-21.609,-39.609],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":133.999988401895,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p667_1_0p167_0"],"t":0,"s":[30],"e":[30]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":4,"s":[30],"e":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":10,"s":[100],"e":[30]},{"t":13.9999987882577}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[-21.609,-39.609,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":4,"s":[100,100,100],"e":[120,120,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":10,"s":[120,120,100],"e":[100,100,100]},{"t":13.9999987882577}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[100,100],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.43529399797,0.862744978362,0.854902020623,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-21.609,-39.609],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":133.999988401895,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[30],"e":[30]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":8,"s":[30],"e":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":14,"s":[100],"e":[30]},{"t":17.9999984420456}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[-21.609,-39.609,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":8,"s":[100,100,100],"e":[120,120,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":14,"s":[120,120,100],"e":[100,100,100]},{"t":17.9999984420456}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[150,150],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.007843137255,0.756862745098,0.745098039216,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-21.609,-39.609],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":133.999988401895,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[30],"e":[30]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":12,"s":[30],"e":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":18,"s":[100],"e":[30]},{"t":21.9999980958335}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[-21.609,-39.609,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":12,"s":[100,100,100],"e":[120,120,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":18,"s":[120,120,100],"e":[100,100,100]},{"t":21.9999980958335}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[200,200],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.43529399797,0.862744978362,0.854902020623,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-21.609,-39.609],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":133.999988401895,"st":0,"bm":0}]}
--------------------------------------------------------------------------------