Skip to content

Commit f064700

Browse files
author
AnkitDroidGit
committed
Updated dependencies
1 parent a3a4e9d commit f064700

File tree

9 files changed

+41
-35
lines changed

9 files changed

+41
-35
lines changed

.idea/caches/build_file_checksums.ser

-36 Bytes
Binary file not shown.

.idea/modules.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ apply plugin: 'kotlin-android'
55
apply plugin: 'kotlin-android-extensions'
66

77
android {
8-
compileSdkVersion 27
8+
compileSdkVersion 28
99
defaultConfig {
1010
applicationId "com.freeankit.foldinganimation"
1111
minSdkVersion 21
12-
targetSdkVersion 27
12+
targetSdkVersion 28
1313
versionCode 1
1414
versionName "1.0"
1515
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -25,10 +25,10 @@ android {
2525
dependencies {
2626
implementation fileTree(dir: 'libs', include: ['*.jar'])
2727
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
28-
implementation 'com.android.support:appcompat-v7:27.1.1'
29-
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
30-
implementation 'com.android.support:recyclerview-v7:27.1.1'
31-
implementation 'com.android.support:cardview-v7:27.1.1'
28+
implementation 'com.android.support:appcompat-v7:28.0.0'
29+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
30+
implementation 'com.android.support:recyclerview-v7:28.0.0'
31+
implementation 'com.android.support:cardview-v7:28.0.0'
3232
testImplementation 'junit:junit:4.12'
3333
androidTestImplementation 'com.android.support.test:runner:1.0.2'
3434
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

app/src/main/java/com/freeankit/foldinganimation/SampleAdapter.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class SampleAdapter : RecyclerView.Adapter<SampleAdapter.ViewHolder>() {
3030
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
3131
fun bind(position: Int) = with(itemView) {
3232

33+
// folding_cell.setBackgroundColor(resources.getColor(R.color.colorPrimary))
34+
folding_cell.backSideColor = resources.getColor(R.color.colorPrimary)
35+
3336
if (unfoldedIndexes.contains(position)) {
3437
cell_title_view.visibility = View.GONE
3538
cell_content_view.visibility = View.VISIBLE
@@ -38,12 +41,12 @@ class SampleAdapter : RecyclerView.Adapter<SampleAdapter.ViewHolder>() {
3841
cell_title_view.visibility = View.VISIBLE
3942
}
4043

41-
itemView.setOnClickListener({
44+
itemView.setOnClickListener {
4245
// toggle clicked cell state
4346
folding_cell.toggle(false)
4447
// register in adapter that state for selected cell is toggled
4548
registerToggle(position)
46-
})
49+
}
4750
}
4851

4952
private fun registerToggle(position: Int) {

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.2.41'
4+
ext.kotlin_version = '1.3.0'
55
repositories {
66
google()
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.1.2'
10+
classpath 'com.android.tools.build:gradle:3.2.1'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212

1313
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'

foldingkit/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ apply plugin: 'com.github.dcendents.android-maven'
66

77

88
group = 'com.cogitator.foldingkit'
9-
version = '1.0.1'
9+
version = '1.1.0'
1010

1111
android {
12-
compileSdkVersion 27
12+
compileSdkVersion 28
1313
defaultConfig {
1414
minSdkVersion 19
15-
targetSdkVersion 27
15+
targetSdkVersion 28
1616
versionCode 1
1717
versionName "1.0"
1818

@@ -32,7 +32,7 @@ android {
3232
dependencies {
3333
implementation fileTree(dir: 'libs', include: ['*.jar'])
3434

35-
implementation 'com.android.support:appcompat-v7:27.1.1'
35+
implementation 'com.android.support:appcompat-v7:28.0.0'
3636
testImplementation 'junit:junit:4.12'
3737
androidTestImplementation 'com.android.support.test:runner:1.0.2'
3838
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

foldingkit/src/main/java/com/cogitator/foldingit/FoldingKit.kt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import android.widget.RelativeLayout
1616
import com.cogitator.foldingit.animation.AnimationEndListener
1717
import com.cogitator.foldingit.animation.FoldAnimation
1818
import com.cogitator.foldingit.animation.HeightAnimation
19+
import com.cogitator.foldingit.views.FoldingKitView
1920
import com.freeankit.foldingit.R
20-
import com.freeankit.foldingit.views.FoldingKitView
2121
import java.util.*
2222

2323
/**
@@ -40,9 +40,9 @@ open class FoldingKit : RelativeLayout {
4040
private val DEF_CAMERA_HEIGHT = 30
4141

4242
// current settings
43-
private var mAnimationDuration = DEF_ANIMATION_DURATION
44-
private var mBackSideColor = DEF_BACK_SIDE_COLOR
45-
private var mAdditionalFlipsCount = DEF_ADDITIONAL_FLIPS
43+
public var animationDuration = DEF_ANIMATION_DURATION
44+
public var backSideColor = DEF_BACK_SIDE_COLOR
45+
public var additionalFlipsCount = DEF_ADDITIONAL_FLIPS
4646
private var mCameraHeight = DEF_CAMERA_HEIGHT
4747

4848
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
@@ -70,9 +70,9 @@ open class FoldingKit : RelativeLayout {
7070
* @param additionalFlipsCount count of additional flips (after first one), set 0 for auto
7171
*/
7272
fun initialize(animationDuration: Int, backSideColor: Int, additionalFlipsCount: Int) {
73-
this.mAnimationDuration = animationDuration
74-
this.mBackSideColor = backSideColor
75-
this.mAdditionalFlipsCount = additionalFlipsCount
73+
this.animationDuration = animationDuration
74+
this.backSideColor = backSideColor
75+
this.additionalFlipsCount = additionalFlipsCount
7676
}
7777

7878
/**
@@ -83,9 +83,9 @@ open class FoldingKit : RelativeLayout {
8383
* @param additionalFlipsCount count of additional flips (after first one), set 0 for auto
8484
*/
8585
fun initialize(cameraHeight: Int, animationDuration: Int, backSideColor: Int, additionalFlipsCount: Int) {
86-
this.mAnimationDuration = animationDuration
87-
this.mBackSideColor = backSideColor
88-
this.mAdditionalFlipsCount = additionalFlipsCount
86+
this.animationDuration = animationDuration
87+
this.backSideColor = backSideColor
88+
this.additionalFlipsCount = additionalFlipsCount
8989
this.mCameraHeight = cameraHeight
9090
}
9191

@@ -119,12 +119,12 @@ open class FoldingKit : RelativeLayout {
119119
val foldingLayout = createAndPrepareFoldingContainer()
120120
this.addView(foldingLayout)
121121
// calculate heights of animation parts
122-
val heights = calculateHeightsForAnimationParts(titleView.height, contentView.height, mAdditionalFlipsCount)
122+
val heights = calculateHeightsForAnimationParts(titleView.height, contentView.height, additionalFlipsCount)
123123
// create list with animation parts for animation
124124
val foldingCellElements = prepareViewsForAnimation(heights, bitmapFromTitleView, bitmapFromContentView)
125125
// start unfold animation with end listener
126126
val childCount = foldingCellElements.size
127-
val part90degreeAnimationDuration = mAnimationDuration / (childCount * 2)
127+
val part90degreeAnimationDuration = animationDuration / (childCount * 2)
128128
startUnfoldAnimation(foldingCellElements, foldingLayout, part90degreeAnimationDuration, object : AnimationEndListener() {
129129
override fun onAnimationEnd(animation: Animation?) {
130130
contentView.visibility = View.VISIBLE
@@ -175,11 +175,11 @@ open class FoldingKit : RelativeLayout {
175175
this.addView(foldingLayout)
176176

177177
// calculate heights of animation parts
178-
val heights = calculateHeightsForAnimationParts(titleView.height, contentView.height, mAdditionalFlipsCount)
178+
val heights = calculateHeightsForAnimationParts(titleView.height, contentView.height, additionalFlipsCount)
179179
// create list with animation parts for animation
180180
val foldingCellElements = prepareViewsForAnimation(heights, bitmapFromTitleView, bitmapFromContentView)
181181
val childCount = foldingCellElements.size
182-
val part90degreeAnimationDuration = mAnimationDuration / (childCount * 2)
182+
val part90degreeAnimationDuration = animationDuration / (childCount * 2)
183183
// start fold animation with end listener
184184
startFoldAnimation(foldingCellElements, foldingLayout, part90degreeAnimationDuration, object : AnimationEndListener() {
185185
override fun onAnimationEnd(animation: Animation?) {
@@ -298,7 +298,7 @@ open class FoldingKit : RelativeLayout {
298298
*/
299299
private fun createBackSideView(height: Int): ImageView {
300300
val imageView = ImageView(context)
301-
imageView.setBackgroundColor(mBackSideColor)
301+
imageView.setBackgroundColor(backSideColor)
302302
imageView.layoutParams = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, height)
303303
return imageView
304304
}
@@ -508,9 +508,9 @@ open class FoldingKit : RelativeLayout {
508508
private fun initializeFromAttributes(context: Context, attrs: AttributeSet) {
509509
val array = context.theme.obtainStyledAttributes(attrs, R.styleable.FoldingKit, 0, 0)
510510
try {
511-
this.mAnimationDuration = array.getInt(R.styleable.FoldingKit_animationDuration, DEF_ANIMATION_DURATION)
512-
this.mBackSideColor = array.getColor(R.styleable.FoldingKit_backSideColor, DEF_BACK_SIDE_COLOR)
513-
this.mAdditionalFlipsCount = array.getInt(R.styleable.FoldingKit_additionalFlipsCount, DEF_ADDITIONAL_FLIPS)
511+
this.animationDuration = array.getInt(R.styleable.FoldingKit_animationDuration, DEF_ANIMATION_DURATION)
512+
this.backSideColor = array.getColor(R.styleable.FoldingKit_backSideColor, DEF_BACK_SIDE_COLOR)
513+
this.additionalFlipsCount = array.getInt(R.styleable.FoldingKit_additionalFlipsCount, DEF_ADDITIONAL_FLIPS)
514514
this.mCameraHeight = array.getInt(R.styleable.FoldingKit_cameraHeight, DEF_CAMERA_HEIGHT)
515515
} finally {
516516
array.recycle()

foldingkit/src/main/java/com/cogitator/foldingit/views/FoldingKitView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.freeankit.foldingit.views
1+
package com.cogitator.foldingit.views
22

33
import android.content.Context
44
import android.util.AttributeSet
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Apr 30 14:12:09 MYT 2018
1+
#Fri Nov 23 16:30:06 MYT 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

0 commit comments

Comments
 (0)