From bcad856ba86b1e2982538e7478f896f5271c7ccd Mon Sep 17 00:00:00 2001 From: Semper-Viventem Date: Fri, 27 Jul 2018 17:42:46 +0300 Subject: [PATCH 1/5] Update image and base screen --- .../ru/semper_viventem/backdropview/ui/common/Screen.kt | 7 +++---- .../ru/semper_viventem/backdropview/ui/text/TextScreen.kt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/common/Screen.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/common/Screen.kt index 5f7b67f..b201c92 100644 --- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/common/Screen.kt +++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/common/Screen.kt @@ -1,6 +1,5 @@ package ru.semper_viventem.backdropview.ui.common -import android.content.Context import android.os.Bundle import android.support.v4.app.Fragment import android.view.LayoutInflater @@ -22,10 +21,10 @@ abstract class Screen : Fragment { return inflater.inflate(layoutId, container, false) } - override fun onStart() { - super.onStart() + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) - onInitView(view!!) + onInitView(view) } abstract fun onInitView(view: View) diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/text/TextScreen.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/text/TextScreen.kt index 0f5863b..3dc9bcc 100644 --- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/text/TextScreen.kt +++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/text/TextScreen.kt @@ -13,6 +13,6 @@ class TextScreen : Screen() { override fun onInitView(view: View) { - view.image.load("http://mariakucherenko.com/wp-content/uploads/2011/08/20110814_%D0%BA%D0%BE%D1%82.jpg") + view.image.load("https://habrastorage.org/webt/r9/p8/fi/r9p8figkbszo_cyhdg-6nad4mp0.png") } } \ No newline at end of file From 63d210b6c647ad4adbd006ec3bea7d9f7f70ed68 Mon Sep 17 00:00:00 2001 From: Semper-Viventem Date: Fri, 17 Aug 2018 14:30:26 +0300 Subject: [PATCH 2/5] Fix name of attach method. Update libraries --- README.md | 8 ++++---- backdrop/build.gradle | 2 +- .../ru/semper_viventem/backdrop/BackdropBehavior.kt | 4 ++-- build.gradle | 6 +++--- sample/build.gradle | 4 ++-- .../ru/semper_viventem/backdropview/ui/MainActivity.kt | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0fe02b2..2a4fabc 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@ This library makes it easy to implement a [Backdrop](https://material.io/design/ *For support library:* ```groovy dependencies { - implementation 'ru.semper-viventem.backdrop:backdrop:0.1.2' + implementation 'ru.semper-viventem.backdrop:backdrop:0.1.3' } ``` *For Android X:* ```groovy dependencies { - implementation 'ru.semper-viventem.backdrop:backdrop:0.1.2_x' + implementation 'ru.semper-viventem.backdrop:backdrop:0.1.3_x' } ``` **JitPack:** @@ -97,8 +97,8 @@ fun > View.findBehavior(): T = layoutParams.ru val backdropBehavior: BackdropBehavior = foregroundContainer.findBehavior() // find behavior with(backdropBehavior) { - attacheBackContainer(R.id.backContainer) // set back container - attacheToolbar(R.id.toolbar) // set toolbar + attachBackContainer(R.id.backContainer) // set back container + attachToolbar(R.id.toolbar) // set toolbar // set navigation icons for toolbar setClosedIcon(R.drawable.ic_menu) diff --git a/backdrop/build.gradle b/backdrop/build.gradle index 331b605..7c975ad 100644 --- a/backdrop/build.gradle +++ b/backdrop/build.gradle @@ -20,7 +20,7 @@ ext { siteUrl = 'https://github.com/Semper-Viventem/BackdropView' gitUrl = 'https://github.com/Semper-Viventem/BackdropView' - libraryVersion = '0.1.2' + libraryVersion = '0.1.3' developerId = 'semper-viventem' developerName = 'constantine' diff --git a/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt b/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt index 406fff0..794e6fb 100644 --- a/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt +++ b/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt @@ -93,11 +93,11 @@ class BackdropBehavior : CoordinatorLayout.Behavior { this.closedIconId = iconRes } - fun attacheToolbar(@IdRes toolbarId: Int) { + fun attachToolbar(@IdRes toolbarId: Int) { this.toolbarId = toolbarId } - fun attacheBackContainer(@IdRes backContainerId: Int) { + fun attachBackContainer(@IdRes backContainerId: Int) { this.backContainerId = backContainerId } diff --git a/build.gradle b/build.gradle index ebd7618..e5ea96e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,17 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.41' + ext.kotlin_version = '1.2.50' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.3' + classpath 'com.android.tools.build:gradle:3.1.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' } } diff --git a/sample/build.gradle b/sample/build.gradle index 378bbda..d1df942 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -29,7 +29,7 @@ android { } ext { - supportVersion = '28.0.0-alpha3' + supportVersion = '28.0.0-rc01' retrofitVersion = '2.2.0' conductorVersion = "2.1.4" playServicesVersion = "15.0.0" @@ -56,7 +56,7 @@ dependencies { androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' // Logging - implementation 'com.jakewharton.timber:timber:4.5.1' + implementation 'com.jakewharton.timber:timber:4.7.1' // Images implementation 'com.github.bumptech.glide:glide:4.6.1' kapt 'com.github.bumptech.glide:compiler:4.7.1' diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/MainActivity.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/MainActivity.kt index c771da2..57eff5b 100644 --- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/MainActivity.kt +++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/MainActivity.kt @@ -34,8 +34,8 @@ class MainActivity : AppCompatActivity() { backdropBehavior = foregroundContainer.findBehavior() with(backdropBehavior) { - attacheBackContainer(R.id.backContainer) - attacheToolbar(R.id.toolbar) + attachBackContainer(R.id.backContainer) + attachToolbar(R.id.toolbar) } with(toolbar) { setTitle(R.string.app_name) From 292833b82aae86f45ef5819d9601f505793d154d Mon Sep 17 00:00:00 2001 From: Semper-Viventem Date: Fri, 17 Aug 2018 14:38:57 +0300 Subject: [PATCH 3/5] Update to support 28 --- backdrop/build.gradle | 8 ++++---- .../ru/semper_viventem/backdrop/BackdropBehavior.kt | 4 ++-- sample/build.gradle | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backdrop/build.gradle b/backdrop/build.gradle index 7c975ad..3392390 100644 --- a/backdrop/build.gradle +++ b/backdrop/build.gradle @@ -37,11 +37,11 @@ subprojects { android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { minSdkVersion 21 - targetSdkVersion 27 + targetSdkVersion 28 } buildTypes { @@ -57,8 +57,8 @@ android { } ext { - supportVersion = '27.1.1' - kotlin_version = '1.2.41' + supportVersion = '28.0.0-rc01' + kotlin_version = '1.2.50' } dependencies { diff --git a/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt b/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt index 794e6fb..af85033 100644 --- a/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt +++ b/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt @@ -48,13 +48,13 @@ class BackdropBehavior : CoordinatorLayout.Behavior { constructor(context: Context, attrs: AttributeSet) : super(context, attrs) - override fun onSaveInstanceState(parent: CoordinatorLayout?, child: View?): Parcelable { + override fun onSaveInstanceState(parent: CoordinatorLayout, child: View): Parcelable { return Bundle().apply { putSerializable(ARG_DROP_STATE, dropState) } } - override fun onRestoreInstanceState(parent: CoordinatorLayout?, child: View?, state: Parcelable?) { + override fun onRestoreInstanceState(parent: CoordinatorLayout, child: View, state: Parcelable) { super.onRestoreInstanceState(parent, child, state) dropState = (state as? Bundle)?.getSerializable(ARG_DROP_STATE) as? DropState ?: DEFAULT_DROP_STATE diff --git a/sample/build.gradle b/sample/build.gradle index d1df942..954e6e3 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -6,7 +6,7 @@ apply plugin: 'kotlin-kapt' android { - compileSdkVersion 'android-P' + compileSdkVersion 28 defaultConfig { applicationId "ru.semper_viventem.backdropview" From 17c6b14565a367ca64b34932f9342589a2950ea0 Mon Sep 17 00:00:00 2001 From: Semper-Viventem Date: Fri, 17 Aug 2018 14:52:14 +0300 Subject: [PATCH 4/5] Fix version --- README.md | 4 ++-- backdrop/build.gradle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2a4fabc..ad3a1d5 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@ This library makes it easy to implement a [Backdrop](https://material.io/design/ *For support library:* ```groovy dependencies { - implementation 'ru.semper-viventem.backdrop:backdrop:0.1.3' + implementation 'ru.semper-viventem.backdrop:backdrop:0.1.5' } ``` *For Android X:* ```groovy dependencies { - implementation 'ru.semper-viventem.backdrop:backdrop:0.1.3_x' + implementation 'ru.semper-viventem.backdrop:backdrop:0.1.5_x' } ``` **JitPack:** diff --git a/backdrop/build.gradle b/backdrop/build.gradle index 3392390..be93063 100644 --- a/backdrop/build.gradle +++ b/backdrop/build.gradle @@ -20,7 +20,7 @@ ext { siteUrl = 'https://github.com/Semper-Viventem/BackdropView' gitUrl = 'https://github.com/Semper-Viventem/BackdropView' - libraryVersion = '0.1.3' + libraryVersion = '0.1.5' developerId = 'semper-viventem' developerName = 'constantine' From 5c36e507268c385b51f96fedb4baecedaf719af9 Mon Sep 17 00:00:00 2001 From: Semper-Viventem Date: Fri, 17 Aug 2018 14:58:30 +0300 Subject: [PATCH 5/5] Fix redme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad3a1d5..a54da66 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ repositories { } dependencies { - implementation 'com.github.Semper-Viventem:BackdropView:0.1.2' + implementation 'com.github.Semper-Viventem:BackdropView:0.1.5' } ```