-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index 79ee123..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 937d518..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-sudo: false
-
-language: android
-
-android:
- components:
- - tools
- - platform-tools
- - build-tools-28.0.3
- - android-28
- - extra-google-m2repository
- - extra-android-m2repository
- licenses:
- - 'android-sdk-license-.+'
- - 'google-gdk-license-.+'
-
-before_install:
- - echo yes | sdkmanager "platforms;android-28"
-
-script:
- - ./gradlew clean build -PdisablePreDex --stacktrace --console plain
-
-jdk:
- - oraclejdk8
-
-branches:
- only:
- - master
-
-before_cache:
- - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
-cache:
- directories:
- - $HOME/.gradle/caches/
- - $HOME/.gradle/wrapper/
- - $HOME/.android/build-cache
-
-sudo: false
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 9215f2b..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2018 Chahine Mouhamad
-
-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.
diff --git a/README.md b/README.md
deleted file mode 100644
index 6277bdd..0000000
--- a/README.md
+++ /dev/null
@@ -1,101 +0,0 @@
-[](https://travis-ci.org/chahine/pageindicator)
-[](https://jitpack.io/#chahine/pageindicator)
-
-# Page Indicator
-
-An Instagram like page indicator compatible with [RecyclerView](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html) and [ViewPager](https://developer.android.com/reference/android/support/v4/view/ViewPager.html).
-
-
-
-# Setup
-
-__Step 1.__ Add the JitPack repository to your build file
-```groovy
-allprojects {
- repositories {
- maven { url 'https://jitpack.io' }
- }
-}
-```
-__Step 2.__ Add the dependency
-
-```groovy
-dependencies {
- compile 'com.github.chahine:pageindicator:'
-}
-```
-
-# Usage
-
-Add the `PageIndicator` to your XML file:
-
-```xml
-
-```
-
-#### RecyclerView
-
-```kotlin
- pageIndicator.attachTo(recyclerView)
-```
-
-By default, attaching to a RecyclerView will end up updating the pageIndicator when the most visible item position changes and expect the RecyclerView items to have the same width.
-If you would like to customize this behavior, add a scroll listener to your RecyclerView and use `PageIndicator::swipeNext` and `PageIndicator::swipePrevious`; and set the pageIndicator's count
-
-#### View Pager
-
-```kotlin
- pageIndicator.attachTo(viewPager)
-```
-
-#### Manual
-```kotlin
- pageIndicator.swipePrevious()
- pageIndicator.swipeNext()
-```
-
-# Customization
-
-| Attribute | Note | Default |
-|---------------------|-------------------------------------------|-------------|
-| piDotSpacing | Spacing between dots | 3dp |
-| piDotBound | Range in which the selected dot remains | 40dp |
-| piSize[1-6] | Size from smallest to largest dot | .5dp - 6dp |
-| piAnimDuration | Duration of animation* in ms | 200 |
-| piAnimInterpolator | Animation interpolator* | decelerate |
-| piDefaultColor | Default unselected dot color | #B2B2B2 |
-| piSelectedColor | Selected dot color | #3897F0 |
-
-
-*Note: the animation duration and interpolator are shared between the scroll animation and dot scaling animation.
-
-## License
-
-```
-MIT License
-
-Copyright (c) 2018 Chahine Mouhamad
-
-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.
-
-```
diff --git a/_windows/git.xml b/_windows/git.xml
new file mode 100644
index 0000000..abf244a
--- /dev/null
+++ b/_windows/git.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/_windows/keymap.xml b/_windows/keymap.xml
new file mode 100644
index 0000000..5526d96
--- /dev/null
+++ b/_windows/keymap.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/_windows/laf.xml b/_windows/laf.xml
new file mode 100644
index 0000000..c1f98d9
--- /dev/null
+++ b/_windows/laf.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/_windows/path.macros.xml b/_windows/path.macros.xml
new file mode 100644
index 0000000..447ffe7
--- /dev/null
+++ b/_windows/path.macros.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/androidStudioFirstRun.xml b/androidStudioFirstRun.xml
new file mode 100644
index 0000000..eb43c54
--- /dev/null
+++ b/androidStudioFirstRun.xml
@@ -0,0 +1,8 @@
+
+
+ 1
+
+
+ 3.4.1
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
deleted file mode 100644
index 796b96d..0000000
--- a/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/app/build.gradle b/app/build.gradle
deleted file mode 100644
index c261c91..0000000
--- a/app/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-android {
- compileSdkVersion rootProject.compileSdkVersion
-
- defaultConfig {
- applicationId 'com.chahinem.pageindicator.sample'
-
- minSdkVersion rootProject.minSdkVersion
- targetSdkVersion rootProject.targetSdkVersion
-
- versionCode 1
- versionName '1.0'
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-}
-
-dependencies {
- implementation project(':pageindicator')
-
- implementation rootProject.kotlinStdlib
- implementation rootProject.picasso
- implementation rootProject.supportLibs
-}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
deleted file mode 100644
index f1b4245..0000000
--- a/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 98793ae..0000000
--- a/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/java/com/chahinem/pageindicator/sample/MainActivity.kt b/app/src/main/java/com/chahinem/pageindicator/sample/MainActivity.kt
deleted file mode 100644
index a8f51d1..0000000
--- a/app/src/main/java/com/chahinem/pageindicator/sample/MainActivity.kt
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.chahinem.pageindicator.sample
-
-import android.os.Bundle
-import androidx.appcompat.app.AppCompatActivity
-import androidx.recyclerview.widget.LinearSnapHelper
-import com.chahinem.pageindicator.sample.MyAdapter.MyItem
-import com.squareup.picasso.Picasso.Builder
-import kotlinx.android.synthetic.main.activity_main.leftBtn
-import kotlinx.android.synthetic.main.activity_main.list
-import kotlinx.android.synthetic.main.activity_main.manualPageIndicator
-import kotlinx.android.synthetic.main.activity_main.pageIndicator
-import kotlinx.android.synthetic.main.activity_main.pager
-import kotlinx.android.synthetic.main.activity_main.pagerPageIndicator
-import kotlinx.android.synthetic.main.activity_main.rightBtn
-
-class MainActivity : AppCompatActivity() {
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
-
- val picasso = Builder(this).build()
-
- // RecyclerView
- val adapter = MyAdapter(picasso)
- list.adapter = adapter
- LinearSnapHelper().attachToRecyclerView(list)
- adapter.swapData(LIST_ITEMS)
- pageIndicator attachTo list
-
- // ViewPager
- val myPagerAdapter = MyPagerAdapter(picasso, LIST_ITEMS)
- pager.adapter = myPagerAdapter
- pagerPageIndicator attachTo pager
-
- // Manual
- manualPageIndicator.count = 50
- leftBtn.setOnClickListener { manualPageIndicator.swipePrevious() }
- rightBtn.setOnClickListener { manualPageIndicator.swipeNext() }
- }
-
- companion object {
- private val LIST_ITEMS = listOf(
- MyItem(
- "San Francisco, California",
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod",
- "https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/25024416_182774512460963_6661054269581426688_n.jpg"),
- MyItem(
- "Valensole",
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod",
- "https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/25022757_375109192929045_3153371362454667264_n.jpg"),
- MyItem(
- "Étretat",
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod",
- "https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/25005816_2020789231533395_4507938399037947904_n.jpg"),
- MyItem(
- "Tokyo, Japan",
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod",
- "https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/23421860_192904647945945_6319320906002857984_n.jpg"),
- MyItem(
- "Paris, France",
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod",
- "https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/23347334_633654673691303_8149777143685971968_n.jpg"),
- MyItem(
- "New York, New York",
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod",
- "https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/23101824_1822687121355425_8930059065124454400_n.jpg"),
- MyItem(
- "New York, New York",
- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod",
- "https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/23161047_853121148199404_5154039615094521856_n.jpg")
- )
- }
-}
diff --git a/app/src/main/java/com/chahinem/pageindicator/sample/MyAdapter.kt b/app/src/main/java/com/chahinem/pageindicator/sample/MyAdapter.kt
deleted file mode 100644
index 9d88774..0000000
--- a/app/src/main/java/com/chahinem/pageindicator/sample/MyAdapter.kt
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.chahinem.pageindicator.sample
-
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.ImageView
-import android.widget.TextView
-import androidx.recyclerview.widget.RecyclerView
-import com.chahinem.pageindicator.sample.MyAdapter.MyViewHolder
-import com.squareup.picasso.Picasso
-
-class MyAdapter(private val picasso: Picasso) : RecyclerView.Adapter() {
-
- private val items: MutableList = mutableListOf()
-
- override fun getItemCount() = items.size
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = MyViewHolder(
- LayoutInflater
- .from(parent.context)
- .inflate(R.layout.item_card, parent, false))
-
- override fun onBindViewHolder(holder: MyViewHolder, position: Int) {
- holder.bind(picasso, items[holder.adapterPosition])
- }
-
- fun swapData(data: Iterable?) {
- items.clear()
- data?.let { items.addAll(data) }
- notifyDataSetChanged()
- }
-
- class MyViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
-
- private val title: TextView = itemView.findViewById(R.id.title)
- private val caption: TextView = itemView.findViewById(R.id.caption)
- private val image: ImageView = itemView.findViewById(R.id.image)
-
- fun bind(picasso: Picasso, item: MyItem) {
- picasso
- .load(item.image)
- .placeholder(R.color.colorPrimaryDark)
- .fit()
- .centerCrop()
- .into(image)
- title.text = item.title
- caption.text = item.caption
- }
- }
-
- class MyItem(val title: String, val caption: String, val image: String)
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/chahinem/pageindicator/sample/MyPagerAdapter.kt b/app/src/main/java/com/chahinem/pageindicator/sample/MyPagerAdapter.kt
deleted file mode 100644
index 224436c..0000000
--- a/app/src/main/java/com/chahinem/pageindicator/sample/MyPagerAdapter.kt
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.chahinem.pageindicator.sample
-
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.ImageView
-import android.widget.TextView
-import androidx.viewpager.widget.PagerAdapter
-import com.chahinem.pageindicator.sample.MyAdapter.MyItem
-import com.squareup.picasso.Picasso
-
-class MyPagerAdapter(private val picasso: Picasso,
- private val items: List) : PagerAdapter() {
-
- override fun getCount() = items.size
-
- override fun isViewFromObject(view: View, `object`: Any): Boolean = view == `object`
-
- override fun instantiateItem(container: ViewGroup, position: Int): Any {
- val view = LayoutInflater
- .from(container.context)
- .inflate(R.layout.item_card, container, false)
-
- val item = items[position]
- val title: TextView = view.findViewById(R.id.title)
- val caption: TextView = view.findViewById(R.id.caption)
- val image: ImageView = view.findViewById(R.id.image)
-
- picasso
- .load(item.image)
- .placeholder(R.color.colorPrimaryDark)
- .fit()
- .centerCrop()
- .into(image)
- title.text = item.title
- caption.text = item.caption
-
- container.addView(view)
- return view
- }
-
- override fun destroyItem(container: ViewGroup, position: Int, view: Any) {
- container.removeView(view as View)
- }
-}
\ No newline at end of file
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644
index de7e31c..0000000
--- a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index c394cea..0000000
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index f612b4a..0000000
--- a/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_card.xml b/app/src/main/res/layout/item_card.xml
deleted file mode 100644
index 5e3b7a1..0000000
--- a/app/src/main/res/layout/item_card.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_simple.xml b/app/src/main/res/layout/item_simple.xml
deleted file mode 100644
index bd760d5..0000000
--- a/app/src/main/res/layout/item_simple.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index 6d5e5d0..0000000
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index 6d5e5d0..0000000
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a2f5908..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 1b52399..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index ff10afd..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index 115a4c7..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index dcd3cd8..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index 459ca60..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 8ca12fe..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index 8e19b41..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index b824ebd..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index 4c19a13..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
deleted file mode 100644
index 5a077b3..0000000
--- a/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- #3F51B5
- #303F9F
- #FF4081
-
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
deleted file mode 100644
index 6b7bdf9..0000000
--- a/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Page Indicator
-
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
deleted file mode 100644
index 705be27..0000000
--- a/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
diff --git a/art/pageindicator.gif b/art/pageindicator.gif
deleted file mode 100644
index 8dcf20e..0000000
Binary files a/art/pageindicator.gif and /dev/null differ
diff --git a/art/pageindicator.mp4 b/art/pageindicator.mp4
deleted file mode 100644
index d4f2126..0000000
Binary files a/art/pageindicator.mp4 and /dev/null differ
diff --git a/baseRefactoring.xml b/baseRefactoring.xml
new file mode 100644
index 0000000..a75c19d
--- /dev/null
+++ b/baseRefactoring.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index dd8fa7b..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,29 +0,0 @@
-buildscript {
- apply from: rootProject.file('dependencies.gradle')
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:$gradleVersion"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
- classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
- }
-}
-
-plugins {
- id 'com.github.ben-manes.versions' version '0.20.0'
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- maven { url 'https://jitpack.io' }
- maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
\ No newline at end of file
diff --git a/certificates.xml b/certificates.xml
new file mode 100644
index 0000000..987d389
--- /dev/null
+++ b/certificates.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/code.style.schemes b/code.style.schemes
new file mode 100644
index 0000000..4d2ece5
--- /dev/null
+++ b/code.style.schemes
@@ -0,0 +1,230 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/code.style.schemes.xml b/code.style.schemes.xml
new file mode 100644
index 0000000..d11383f
--- /dev/null
+++ b/code.style.schemes.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/codestyles/Default.xml b/codestyles/Default.xml
new file mode 100644
index 0000000..ba99f07
--- /dev/null
+++ b/codestyles/Default.xml
@@ -0,0 +1,152 @@
+
+
+
+
\ No newline at end of file
diff --git a/editor.codeinsight.xml b/editor.codeinsight.xml
new file mode 100644
index 0000000..972200b
--- /dev/null
+++ b/editor.codeinsight.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/editor.rich.copy.xml b/editor.rich.copy.xml
new file mode 100644
index 0000000..a9f5199
--- /dev/null
+++ b/editor.rich.copy.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/editor.xml b/editor.xml
new file mode 100644
index 0000000..9bb90ec
--- /dev/null
+++ b/editor.xml
@@ -0,0 +1,12 @@
+
+
+
+ *.properties
+ *.html
+ *.jsp
+ *.xml
+ *.java
+ *.js
+ *.as
+ *.css
+ *.mxml
+ *.kt
+
+
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index dcff845..0000000
--- a/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-android.enableJetifier = true
-android.useAndroidX = true
-org.gradle.jvmargs = -Xmx1536m
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 0d4a951..0000000
Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 51e3fbd..0000000
--- a/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase = GRADLE_USER_HOME
-distributionPath = wrapper/dists
-distributionUrl = https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
-zipStoreBase = GRADLE_USER_HOME
-zipStorePath = wrapper/dists
diff --git a/gradlew b/gradlew
deleted file mode 100755
index cccdd3d..0000000
--- a/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index f955316..0000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/ide.general.xml b/ide.general.xml
new file mode 100644
index 0000000..d779b2c
--- /dev/null
+++ b/ide.general.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ignore.xml b/ignore.xml
new file mode 100644
index 0000000..bf2a40a
--- /dev/null
+++ b/ignore.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ### Example user template
+
+# IntelliJ project files
+.idea
+*.iml
+out
+gen
+
+
+
\ No newline at end of file
diff --git a/inspection/Default.xml b/inspection/Default.xml
new file mode 100644
index 0000000..da0c24f
--- /dev/null
+++ b/inspection/Default.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/keymaps/Default copy.xml b/keymaps/Default copy.xml
new file mode 100644
index 0000000..ef6d5d8
--- /dev/null
+++ b/keymaps/Default copy.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/material_custom_theme.xml b/material_custom_theme.xml
new file mode 100644
index 0000000..5959436
--- /dev/null
+++ b/material_custom_theme.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/material_theme.xml b/material_theme.xml
new file mode 100644
index 0000000..b1c1125
--- /dev/null
+++ b/material_theme.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/notifications.xml b/notifications.xml
new file mode 100644
index 0000000..e179ceb
--- /dev/null
+++ b/notifications.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/pageindicator/.gitignore b/pageindicator/.gitignore
deleted file mode 100644
index 796b96d..0000000
--- a/pageindicator/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/pageindicator/build.gradle b/pageindicator/build.gradle
deleted file mode 100644
index 7db821e..0000000
--- a/pageindicator/build.gradle
+++ /dev/null
@@ -1,33 +0,0 @@
-apply plugin: 'com.android.library'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-apply plugin: 'com.github.dcendents.android-maven'
-
-android {
- compileSdkVersion rootProject.compileSdkVersion
-
- defaultConfig {
- minSdkVersion rootProject.minSdkVersion
- targetSdkVersion rootProject.targetSdkVersion
-
- versionCode 1
- versionName '1.0'
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-
- testOptions.unitTests.all {
- testLogging {
- events "passed", "skipped", "failed", "standardOut", "standardError"
- outputs.upToDateWhen { false }
- showStandardStreams = true
- }
- }
-}
-
-dependencies {
- compileOnly rootProject.kotlinStdlib
- compileOnly rootProject.recyclerviewV7
- testImplementation rootProject.junit
- testImplementation rootProject.kotlinStdlib
-}
diff --git a/pageindicator/src/main/AndroidManifest.xml b/pageindicator/src/main/AndroidManifest.xml
deleted file mode 100644
index 794d701..0000000
--- a/pageindicator/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/pageindicator/src/main/java/com/chahinem/pageindicator/DotManager.kt b/pageindicator/src/main/java/com/chahinem/pageindicator/DotManager.kt
deleted file mode 100644
index 9080ad4..0000000
--- a/pageindicator/src/main/java/com/chahinem/pageindicator/DotManager.kt
+++ /dev/null
@@ -1,169 +0,0 @@
-package com.chahinem.pageindicator
-
-internal class DotManager(
- count: Int,
- private val dotSize: Int,
- private val dotSpacing: Int,
- private val dotBound: Int,
- private val dotSizes: Map,
- private val targetScrollListener: TargetScrollListener? = null
-) {
-
- internal var dots: ByteArray = ByteArray(count)
- internal var selectedIndex = 0
-
- private var scrollAmount = 0
-
- init {
-
- if (count > 0) {
- dots[0] = 6
- }
-
- if (count <= SIZE_THRESHOLD) {
- (1 until count).forEach { i -> dots[i] = 5 }
- } else {
- (1..3).forEach { i -> dots[i] = 5 }
- dots[4] = 4
- if (count > SIZE_THRESHOLD) {
- dots[5] = 2
- }
- (SIZE_THRESHOLD + 1 until count).forEach { i -> dots[i] = 0 }
- }
- }
-
- internal fun dots() = dots.joinToString("")
-
- fun dotSizeFor(size: Byte) = dotSizes[size] ?: 0
-
- fun goToNext() {
- if (selectedIndex >= dots.size - 1) {
- return
- }
-
- ++selectedIndex
-
- if (dots.size <= SIZE_THRESHOLD) {
- goToNextSmall()
- } else {
- goToNextLarge()
- }
- }
-
- fun goToPrevious() {
- if (selectedIndex == 0) {
- return
- }
-
- --selectedIndex
-
- if (dots.size <= SIZE_THRESHOLD) {
- goToPreviousSmall()
- } else {
- goToPreviousLarge()
- }
- }
-
- private fun goToNextSmall() {
- dots[selectedIndex] = 6
- dots[selectedIndex - 1] = 5
- }
-
- private fun goToNextLarge() {
- var needScroll = false
-
- // swap 6 and 5
- dots[selectedIndex] = 6
- dots[selectedIndex - 1] = 5
-
- // no more than 3 5's in a row backward
- if (selectedIndex > 3
- && dots[selectedIndex - 1] == 5.toByte()
- && dots[selectedIndex - 2] == 5.toByte()
- && dots[selectedIndex - 3] == 5.toByte()
- && dots[selectedIndex - 4] == 5.toByte()) {
- dots[selectedIndex - 4] = 4
- needScroll = true
- if (selectedIndex - 5 >= 0) {
- dots[selectedIndex - 5] = 2
- (selectedIndex - 6 downTo 0)
- .takeWhile { dots[it] != 0.toByte() }
- .forEach { dots[it] = 0 }
- }
- }
-
- // 6 must around around 3 or higher
- if (selectedIndex + 1 < dots.size && dots[selectedIndex + 1] < 3) {
- dots[selectedIndex + 1] = 3
- needScroll = true
- // set the next one to 1 if any
- if (selectedIndex + 2 < dots.size && dots[selectedIndex + 2] < 1) {
- dots[selectedIndex + 2] = 1
- }
- }
-
- // Scroll to keep the selected dot within bound
- if (needScroll) {
- val endBound = selectedIndex * (dotSize + dotSpacing) + dotSize
- if (endBound > dotBound) {
- scrollAmount = endBound - dotBound
- targetScrollListener?.scrollToTarget(scrollAmount)
- }
- }
- }
-
- private fun goToPreviousSmall() {
- dots[selectedIndex] = 6
- dots[selectedIndex + 1] = 5
- }
-
- private fun goToPreviousLarge() {
- var needScroll = false
- // swap 6 and 5
- dots[selectedIndex] = 6
- dots[selectedIndex + 1] = 5
-
- // no more than 3 5's in a row backward
- if (selectedIndex < dots.size - 4
- && dots[selectedIndex + 1] == 5.toByte()
- && dots[selectedIndex + 2] == 5.toByte()
- && dots[selectedIndex + 3] == 5.toByte()
- && dots[selectedIndex + 4] == 5.toByte()) {
- dots[selectedIndex + 4] = 4
- needScroll = true
- if (selectedIndex + 5 < dots.size) {
- dots[selectedIndex + 5] = 2
- (selectedIndex + 6 until dots.size)
- .takeWhile { dots[it] != 0.toByte() }
- .forEach { i -> dots[i] = 0 }
- }
- }
-
- // 6 must around around 3 or higher
- if (selectedIndex - 1 >= 0 && dots[selectedIndex - 1] < 3) {
- needScroll = true
- dots[selectedIndex - 1] = 3
- // set the next one to 1 if any
- if (selectedIndex - 2 >= 0 && dots[selectedIndex - 2] < 1) {
- dots[selectedIndex - 2] = 1
- }
- }
-
- // Scroll to keep the selected dot within bound
- if (needScroll) {
- val startBound = selectedIndex * (dotSize + dotSpacing)
- if (startBound < scrollAmount) {
- scrollAmount = selectedIndex * (dotSize + dotSpacing)
- targetScrollListener?.scrollToTarget(scrollAmount)
- }
- }
- }
-
- interface TargetScrollListener {
- fun scrollToTarget(target: Int)
- }
-
- companion object {
- private const val SIZE_THRESHOLD = 5
- }
-}
\ No newline at end of file
diff --git a/pageindicator/src/main/java/com/chahinem/pageindicator/Dps.kt b/pageindicator/src/main/java/com/chahinem/pageindicator/Dps.kt
deleted file mode 100644
index 271a798..0000000
--- a/pageindicator/src/main/java/com/chahinem/pageindicator/Dps.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.chahinem.pageindicator
-
-import android.content.res.Resources
-
-inline val Int.dp: Int
- get() = (this * Resources.getSystem().displayMetrics.density).toInt()
-
-inline val Float.dp: Int
- get() = (this * Resources.getSystem().displayMetrics.density).toInt()
\ No newline at end of file
diff --git a/pageindicator/src/main/java/com/chahinem/pageindicator/PageChangeListener.kt b/pageindicator/src/main/java/com/chahinem/pageindicator/PageChangeListener.kt
deleted file mode 100644
index fb3f060..0000000
--- a/pageindicator/src/main/java/com/chahinem/pageindicator/PageChangeListener.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.chahinem.pageindicator
-
-import androidx.viewpager.widget.ViewPager
-
-internal class PageChangeListener(private val indicator: PageIndicator) : ViewPager.OnPageChangeListener {
- private var selectedPage = 0
-
- override fun onPageScrollStateChanged(state: Int) {}
-
- override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
-
- override fun onPageSelected(position: Int) {
- if (position != selectedPage) {
- when {
- this.selectedPage < position -> indicator.swipeNext()
- else -> indicator.swipePrevious()
- }
- }
- selectedPage = position
- }
-}
diff --git a/pageindicator/src/main/java/com/chahinem/pageindicator/PageIndicator.kt b/pageindicator/src/main/java/com/chahinem/pageindicator/PageIndicator.kt
deleted file mode 100644
index 8e795ff..0000000
--- a/pageindicator/src/main/java/com/chahinem/pageindicator/PageIndicator.kt
+++ /dev/null
@@ -1,230 +0,0 @@
-package com.chahinem.pageindicator
-
-import android.animation.ValueAnimator
-import android.content.Context
-import android.graphics.Canvas
-import android.graphics.Paint
-import android.os.Parcelable
-import android.util.AttributeSet
-import android.view.View
-import android.view.animation.AnimationUtils
-import android.view.animation.DecelerateInterpolator
-import android.view.animation.Interpolator
-import androidx.core.content.ContextCompat
-import androidx.recyclerview.widget.RecyclerView
-import androidx.viewpager.widget.PagerAdapter
-import androidx.viewpager.widget.ViewPager
-import com.chahinem.pageindicator.DotManager.TargetScrollListener
-
-class PageIndicator @JvmOverloads constructor(
- context: Context,
- attrs: AttributeSet? = null,
- defStyleAttr: Int = 0
-) : View(context, attrs, defStyleAttr), TargetScrollListener {
-
- private lateinit var dotSizes: IntArray
- private lateinit var dotAnimators: Array
-
- private val defaultPaint = Paint().apply { isAntiAlias = true }
- private val selectedPaint = Paint().apply { isAntiAlias = true }
-
- private val dotSize: Int
- private val dotSizeMap: Map
- private val dotBound: Int
- private val dotSpacing: Int
- private val animDuration: Long
- private val animInterpolator: Interpolator
-
- private var dotManager: DotManager? = null
- private var scrollAmount: Int = 0
- private var scrollAnimator: ValueAnimator? = null
- private var initialPadding: Int = 0
-
- private lateinit var scrollListener: RecyclerView.OnScrollListener
- private lateinit var pageChangeListener: ViewPager.OnPageChangeListener
-
- var count: Int = 0
- set(value) {
- dotManager = DotManager(
- value,
- dotSize,
- dotSpacing,
- dotBound,
- dotSizeMap,
- this)
-
- dotSizes = IntArray(value)
- dotManager?.let { it.dots.forEachIndexed { index, dot -> dotSizes[index] = it.dotSizeFor(dot) } }
- dotAnimators = Array(value) { ValueAnimator() }
-
- initialPadding = when (value) {
- in 0..4 -> (dotBound + (4 - value) * (dotSize + dotSpacing) + dotSpacing) / 2
- else -> 2 * (dotSize + dotSpacing)
- }
- invalidate()
- }
-
- init {
- val ta = getContext().obtainStyledAttributes(attrs, R.styleable.PageIndicator)
- dotSizeMap = mapOf(
- BYTE_6 to ta.getDimensionPixelSize(R.styleable.PageIndicator_piSize1, 6.dp),
- BYTE_5 to ta.getDimensionPixelSize(R.styleable.PageIndicator_piSize2, 5f.dp),
- BYTE_4 to ta.getDimensionPixelSize(R.styleable.PageIndicator_piSize3, 4.5f.dp),
- BYTE_3 to ta.getDimensionPixelSize(R.styleable.PageIndicator_piSize4, 3f.dp),
- BYTE_2 to ta.getDimensionPixelSize(R.styleable.PageIndicator_piSize5, 2.5f.dp),
- BYTE_1 to ta.getDimensionPixelSize(R.styleable.PageIndicator_piSize6, .5f.dp)
- )
- dotSize = dotSizeMap.values.max() ?: 0
- dotSpacing = ta.getDimensionPixelSize(R.styleable.PageIndicator_piDotSpacing, 3.dp)
- dotBound = ta.getDimensionPixelSize(R.styleable.PageIndicator_piDotBound, 40.dp)
-
- animDuration = ta.getInteger(
- R.styleable.PageIndicator_piAnimDuration, DEFAULT_ANIM_DURATION).toLong()
- defaultPaint.color = ta.getColor(
- R.styleable.PageIndicator_piDefaultColor,
- ContextCompat.getColor(getContext(), R.color.pi_default_color))
- selectedPaint.color = ta.getColor(
- R.styleable.PageIndicator_piSelectedColor,
- ContextCompat.getColor(getContext(), R.color.pi_selected_color))
- animInterpolator = AnimationUtils.loadInterpolator(context, ta.getResourceId(
- R.styleable.PageIndicator_piAnimInterpolator,
- R.anim.pi_default_interpolator))
- ta.recycle()
- }
-
- override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec)
- // FIXME: add support for `match_parent`
- setMeasuredDimension(4 * (dotSize + dotSpacing) + dotBound, dotSize)
- }
-
- override fun onDraw(canvas: Canvas?) {
- super.onDraw(canvas)
-
- var paddingStart = initialPadding
- val (start, end) = getDrawingRange()
-
- paddingStart += (dotSize + dotSpacing) * start
- (start until end).forEach {
- canvas?.drawCircle(
- paddingStart + dotSize / 2f - scrollAmount,
- dotSize / 2f,
- dotSizes[it] / 2f,
- when (dotManager?.dots?.get(it)) {
- BYTE_6 -> selectedPaint
- else -> defaultPaint
- })
- paddingStart += dotSize + dotSpacing
- }
- }
-
- override fun onSaveInstanceState(): Parcelable? {
- val superState = super.onSaveInstanceState()
- if (superState == null) {
- return superState
- }
-
- val savedState = SavedState(superState)
- savedState.count = this.count
- savedState.selectedIndex = this.dotManager?.selectedIndex ?: 0
- return savedState
- }
-
- override fun onRestoreInstanceState(state: Parcelable?) {
- if (state !is SavedState) {
- super.onRestoreInstanceState(state)
- return
- }
-
- super.onRestoreInstanceState(state.superState)
-
- this.count = state.count
- for (i in 0 until state.selectedIndex) {
- swipeNext()
- }
- }
-
- override fun scrollToTarget(target: Int) {
- scrollAnimator?.cancel()
- scrollAnimator = ValueAnimator.ofInt(scrollAmount, target).apply {
- duration = animDuration
- interpolator = DEFAULT_INTERPOLATOR
- addUpdateListener { animation ->
- scrollAmount = animation.animatedValue as Int
- invalidate()
- }
- start()
- }
- }
-
- infix fun attachTo(recyclerView: RecyclerView) {
- if (::scrollListener.isInitialized) {
- recyclerView.removeOnScrollListener(scrollListener)
- }
- count = recyclerView.adapter?.itemCount ?: 0
- scrollListener = ScrollListener(this)
- recyclerView.addOnScrollListener(scrollListener)
- scrollToTarget(0)
- }
-
- infix fun attachTo(viewPager: ViewPager) {
- if (::pageChangeListener.isInitialized) {
- viewPager.removeOnPageChangeListener(pageChangeListener)
- }
- count = (viewPager.adapter as PagerAdapter).count
- pageChangeListener = PageChangeListener(this)
- viewPager.addOnPageChangeListener(pageChangeListener)
- scrollToTarget(0)
- }
-
- fun swipePrevious() {
- dotManager?.goToPrevious()
- animateDots()
- }
-
- fun swipeNext() {
- dotManager?.goToNext()
- animateDots()
- }
-
- private fun animateDots() {
- dotManager?.let {
- val (start, end) = getDrawingRange()
- (start until end).forEach { index ->
- dotAnimators[index].cancel()
- dotAnimators[index] = ValueAnimator.ofInt(dotSizes[index], it.dotSizeFor(it.dots[index]))
- .apply {
- duration = animDuration
- interpolator = DEFAULT_INTERPOLATOR
- addUpdateListener { animation ->
- dotSizes[index] = animation.animatedValue as Int
- invalidate()
- }
- }
- dotAnimators[index].start()
- }
- }
- }
-
- private fun getDrawingRange(): Pair {
- val start = Math.max(0, (dotManager?.selectedIndex ?: 0) - MOST_VISIBLE_COUNT)
- val end = Math.min(
- dotManager?.dots?.size ?: 0,
- (dotManager?.selectedIndex ?: 0) + MOST_VISIBLE_COUNT)
- return Pair(start, end)
- }
-
- companion object {
- private const val BYTE_6 = 6.toByte()
- private const val BYTE_5 = 5.toByte()
- private const val BYTE_4 = 4.toByte()
- private const val BYTE_3 = 3.toByte()
- private const val BYTE_2 = 2.toByte()
- private const val BYTE_1 = 1.toByte()
-
- private const val MOST_VISIBLE_COUNT = 10
- private const val DEFAULT_ANIM_DURATION = 200
-
- private val DEFAULT_INTERPOLATOR = DecelerateInterpolator()
- }
-}
\ No newline at end of file
diff --git a/pageindicator/src/main/java/com/chahinem/pageindicator/SavedState.kt b/pageindicator/src/main/java/com/chahinem/pageindicator/SavedState.kt
deleted file mode 100644
index cbbe4aa..0000000
--- a/pageindicator/src/main/java/com/chahinem/pageindicator/SavedState.kt
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.chahinem.pageindicator
-
-import android.os.Parcel
-import android.os.Parcelable
-import android.view.View.BaseSavedState
-import org.jetbrains.annotations.NotNull
-
-internal class SavedState : BaseSavedState {
- var count: Int = 0
- var selectedIndex = 0
-
- constructor(superState: Parcelable) : super(superState)
-
- private constructor(`in`: Parcel) : super(`in`) {
- this.count = `in`.readInt()
- this.selectedIndex = `in`.readInt()
- }
-
- override fun writeToParcel(out: Parcel, flags: Int) {
- super.writeToParcel(out, flags)
- out.writeInt(this.count)
- out.writeInt(this.selectedIndex)
- }
-
- companion object {
- @JvmField
- @NotNull
- val CREATOR: Parcelable.Creator = object : Parcelable.Creator {
- override fun createFromParcel(`in`: Parcel): SavedState {
- return SavedState(`in`)
- }
-
- override fun newArray(size: Int): Array {
- return arrayOfNulls(size)
- }
- }
- }
-}
\ No newline at end of file
diff --git a/pageindicator/src/main/java/com/chahinem/pageindicator/ScrollListener.kt b/pageindicator/src/main/java/com/chahinem/pageindicator/ScrollListener.kt
deleted file mode 100644
index b3775da..0000000
--- a/pageindicator/src/main/java/com/chahinem/pageindicator/ScrollListener.kt
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.chahinem.pageindicator
-
-import androidx.recyclerview.widget.RecyclerView
-
-internal class ScrollListener(private val indicator: PageIndicator) : RecyclerView.OnScrollListener() {
- private var midPos = 0
- private var scrollX = 0
-
- override fun onScrolled(recyclerView: RecyclerView,
- dx: Int,
- dy: Int) {
- super.onScrolled(recyclerView, dx, dy)
- scrollX += dx
- recyclerView.getChildAt(0)?.width?.let {
- val midPos = Math.floor(((scrollX + it / 2f) / it).toDouble()).toInt()
- if (this.midPos != midPos) {
- when {
- this.midPos < midPos -> indicator.swipeNext()
- else -> indicator.swipePrevious()
- }
- }
- this.midPos = midPos
- }
- }
-}
diff --git a/pageindicator/src/main/res/anim/pi_default_interpolator.xml b/pageindicator/src/main/res/anim/pi_default_interpolator.xml
deleted file mode 100644
index 63ed5f6..0000000
--- a/pageindicator/src/main/res/anim/pi_default_interpolator.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/pageindicator/src/main/res/values/attrs.xml b/pageindicator/src/main/res/values/attrs.xml
deleted file mode 100644
index 72af663..0000000
--- a/pageindicator/src/main/res/values/attrs.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pageindicator/src/main/res/values/colors.xml b/pageindicator/src/main/res/values/colors.xml
deleted file mode 100644
index b8132b0..0000000
--- a/pageindicator/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- #3897F0
- #B2B2B2
-
\ No newline at end of file
diff --git a/pageindicator/src/main/res/values/strings.xml b/pageindicator/src/main/res/values/strings.xml
deleted file mode 100644
index 8542005..0000000
--- a/pageindicator/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/pageindicator/src/test/java/com/chahinem/pageindicator/DotManagerTest.kt b/pageindicator/src/test/java/com/chahinem/pageindicator/DotManagerTest.kt
deleted file mode 100644
index 303eaaa..0000000
--- a/pageindicator/src/test/java/com/chahinem/pageindicator/DotManagerTest.kt
+++ /dev/null
@@ -1,140 +0,0 @@
-package com.chahinem.pageindicator
-
-import org.junit.Assert.assertEquals
-import org.junit.Test
-
-class DotManagerTest {
- companion object {
- private val dotSizes = mapOf(
- 6.toByte() to 12,
- 5.toByte() to 10,
- 4.toByte() to 9,
- 3.toByte() to 6,
- 2.toByte() to 5,
- 1.toByte() to 1
- )
- }
-
- @Test fun init_isCorrect() {
- assertEquals("6", DotManager(1, 0, 0, 0, dotSizes).dots())
- assertEquals("65", DotManager(2, 0, 0, 0, dotSizes).dots())
- assertEquals("655", DotManager(3, 0, 0, 0, dotSizes).dots())
- assertEquals("6555", DotManager(4, 0, 0, 0, dotSizes).dots())
- assertEquals("65555", DotManager(5, 0, 0, 0, dotSizes).dots())
- assertEquals("655542", DotManager(6, 0, 0, 0, dotSizes).dots())
- assertEquals("6555420", DotManager(7, 0, 0, 0, dotSizes).dots())
- assertEquals("65554200", DotManager(8, 0, 0, 0, dotSizes).dots())
- }
-
- @Test fun goToNext_small() {
- val dotManager = DotManager(5, 0, 0, 0, dotSizes)
- assertEquals("65555", dotManager.dots())
- dotManager.goToNext()
- assertEquals("56555", dotManager.dots())
- dotManager.goToNext()
- assertEquals("55655", dotManager.dots())
- dotManager.goToNext()
- assertEquals("55565", dotManager.dots())
- dotManager.goToNext()
- assertEquals("55556", dotManager.dots())
- }
-
- @Test fun goToNext_large6() {
- val dotManager = DotManager(6, 0, 0, 0, dotSizes)
- assertEquals("655542", dotManager.dots())
- dotManager.goToNext()
- assertEquals("565542", dotManager.dots())
- dotManager.goToNext()
- assertEquals("556542", dotManager.dots())
- dotManager.goToNext()
- assertEquals("555642", dotManager.dots())
- dotManager.goToNext()
- assertEquals("455563", dotManager.dots())
- dotManager.goToNext()
- assertEquals("245556", dotManager.dots())
- }
-
- @Test fun goToNext_large8() {
- val dotManager = DotManager(8, 0, 0, 0, dotSizes)
- assertEquals("65554200", dotManager.dots())
- dotManager.goToNext()
- assertEquals("56554200", dotManager.dots())
- dotManager.goToNext()
- assertEquals("55654200", dotManager.dots())
- dotManager.goToNext()
- assertEquals("55564200", dotManager.dots())
- dotManager.goToNext()
- assertEquals("45556310", dotManager.dots())
- dotManager.goToNext()
- assertEquals("24555631", dotManager.dots())
- dotManager.goToNext()
- assertEquals("02455563", dotManager.dots())
- dotManager.goToNext()
- assertEquals("00245556", dotManager.dots())
- }
-
- @Test fun goToPrevious_small() {
- val dotManager = DotManager(5, 0, 0, 0, dotSizes)
- assertEquals("65555", dotManager.dots())
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- assertEquals("55556", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("55565", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("55655", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("56555", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("65555", dotManager.dots())
- }
-
- @Test fun goToPrevious_large6() {
- val dotManager = DotManager(6, 0, 0, 0, dotSizes)
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- assertEquals("245556", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("245565", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("245655", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("246555", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("365554", dotManager.dots()) // double check
- dotManager.goToPrevious()
- assertEquals("655542", dotManager.dots())
- }
-
- @Test fun goToPrevious_large8() {
- val dotManager = DotManager(8, 0, 0, 0, dotSizes)
- assertEquals("65554200", dotManager.dots())
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- dotManager.goToNext()
- assertEquals("00245556", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("00245565", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("00245655", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("00246555", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("01365554", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("13655542", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("36555420", dotManager.dots())
- dotManager.goToPrevious()
- assertEquals("65554200", dotManager.dots())
- }
-}
\ No newline at end of file
diff --git a/pageindicator/src/test/java/com/chahinem/pageindicator/ExampleUnitTest.java b/pageindicator/src/test/java/com/chahinem/pageindicator/ExampleUnitTest.java
deleted file mode 100644
index 9e5a868..0000000
--- a/pageindicator/src/test/java/com/chahinem/pageindicator/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.chahinem.pageindicator;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() throws Exception {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/parameter.hints.xml b/parameter.hints.xml
new file mode 100644
index 0000000..8e5df4c
--- /dev/null
+++ b/parameter.hints.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/plugin_ui.xml b/plugin_ui.xml
new file mode 100644
index 0000000..a5d18b5
--- /dev/null
+++ b/plugin_ui.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/power.mode.ii.xml b/power.mode.ii.xml
new file mode 100644
index 0000000..e221fd4
--- /dev/null
+++ b/power.mode.ii.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/project.default.xml b/project.default.xml
new file mode 100644
index 0000000..678e139
--- /dev/null
+++ b/project.default.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projectView.xml b/projectView.xml
new file mode 100644
index 0000000..ca8f0c0
--- /dev/null
+++ b/projectView.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/rainbow_brackets.xml b/rainbow_brackets.xml
new file mode 100644
index 0000000..293382d
--- /dev/null
+++ b/rainbow_brackets.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
deleted file mode 100644
index b948c16..0000000
--- a/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-include ':app'
-include ':pageindicator'
-project(':pageindicator').name = 'pageindicator'
diff --git a/studioFlags.xml b/studioFlags.xml
new file mode 100644
index 0000000..673e7e5
--- /dev/null
+++ b/studioFlags.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sympli.preferences.xml b/sympli.preferences.xml
new file mode 100644
index 0000000..5c2b3ac
--- /dev/null
+++ b/sympli.preferences.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sympli.xml b/sympli.xml
new file mode 100644
index 0000000..eeb38a5
--- /dev/null
+++ b/sympli.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/AndroidLog.xml b/templates/AndroidLog.xml
new file mode 100644
index 0000000..b4b37bb
--- /dev/null
+++ b/templates/AndroidLog.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ui.lnf.xml b/ui.lnf.xml
new file mode 100644
index 0000000..afb8e1b
--- /dev/null
+++ b/ui.lnf.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/usageView.xml b/usageView.xml
new file mode 100644
index 0000000..8cbed31
--- /dev/null
+++ b/usageView.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/vcs.xml b/vcs.xml
new file mode 100644
index 0000000..ea8a18d
--- /dev/null
+++ b/vcs.xml
@@ -0,0 +1,55 @@
+
+
+