Skip to content

Commit

Permalink
* Update library * Fix name of attach method
Browse files Browse the repository at this point in the history
  • Loading branch information
Semper-Viventem committed Aug 17, 2018
1 parent 60aa0fe commit 71612d5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ fun <T : CoordinatorLayout.Behavior<*>> 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)
Expand Down
4 changes: 2 additions & 2 deletions backdrop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ext {
siteUrl = 'https://github.com/Semper-Viventem/BackdropView'
gitUrl = 'https://github.com/Semper-Viventem/BackdropView'

libraryVersion = '0.1.2_x'
libraryVersion = '0.1.3_x'

developerId = 'semper-viventem'
developerName = 'constantine'
Expand Down Expand Up @@ -64,7 +64,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

// Android X
implementation "androidx.appcompat:appcompat:1.0.0-beta01"
implementation "androidx.appcompat:appcompat:1.0.0-rc01"

// Kotlin
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ class BackdropBehavior : CoordinatorLayout.Behavior<View> {
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
}

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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'
}
}
Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

// Android X
implementation "androidx.appcompat:appcompat:1.0.0-beta01"
implementation "androidx.appcompat:appcompat:1.0.0-rc01"
implementation "androidx.constraintlayout:constraintlayout:1.1.2"
implementation "com.google.android.material:material:1.0.0-beta01"
implementation "com.google.android.material:material:1.0.0-rc01"

// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import android.os.Bundle
import androidx.annotation.IdRes
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import kotlinx.android.synthetic.main.activity_main.*
import ru.semper_viventem.backdrop.BackdropBehavior
import ru.semper_viventem.backdropview.R
import ru.semper_viventem.backdropview.findBehavior
import ru.semper_viventem.backdropview.ui.gallery.GalleryScreen
import ru.semper_viventem.backdropview.ui.list.ListScreen
import ru.semper_viventem.backdropview.ui.text.TextScreen
Expand All @@ -34,8 +32,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)
Expand Down

0 comments on commit 71612d5

Please sign in to comment.