diff --git a/README.md b/README.md
index a54da66..af1a11b 100644
--- a/README.md
+++ b/README.md
@@ -15,19 +15,12 @@ This library makes it easy to implement a [Backdrop](https://material.io/design/
## Download
**JCenter (Recommended):**
-
-*For support library:*
```groovy
dependencies {
- implementation 'ru.semper-viventem.backdrop:backdrop:0.1.5'
-}
-```
-*For Android X:*
-```groovy
-dependencies {
- implementation 'ru.semper-viventem.backdrop:backdrop:0.1.5_x'
+ implementation 'ru.semper-viventem.backdrop:backdrop:0.1.6'
}
```
+
**JitPack:**
```groovy
repositories {
@@ -36,34 +29,41 @@ repositories {
}
dependencies {
- implementation 'com.github.Semper-Viventem:BackdropView:0.1.5'
+ implementation 'com.github.Semper-Viventem:BackdropView:0.1.6'
}
```
## How to use it?
-You need to add a layout Toolbar, back container and foreground container
+You need to add front layout and back layout (with toolbar) to CoordinatorLayout.
-Add BackdropBehavior to the Foreground View Container:
+Add BackdropBehavior to your front layout:
**XML**
```xml
-
-
-
-
+
-
-
-
+
+
+
+
+
+
+
-
+
@@ -97,14 +97,16 @@ fun > View.findBehavior(): T = layoutParams.ru
val backdropBehavior: BackdropBehavior = foregroundContainer.findBehavior() // find behavior
with(backdropBehavior) {
- attachBackContainer(R.id.backContainer) // set back container
- attachToolbar(R.id.toolbar) // set toolbar
+
+ // Attach your back layout to behavior.
+ // BackDropBehavior will find the toolbar itself.
+ attachBackLayout(R.id.backLayout)
- // set navigation icons for toolbar
+ // Set navigation icons for toolbar
setClosedIcon(R.drawable.ic_menu)
setOpenedIcon(R.drawable.ic_close)
- // add listener
+ // Add listener
addOnDropListener(object : BackdropBehavior.OnDropListener {
override fun onDrop(dropState: BackdropBehavior.DropState, fromUser: Boolean) {
// TODO: handle listener
diff --git a/backdrop/build.gradle b/backdrop/build.gradle
index be93063..0f14afa 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.5'
+ libraryVersion = '0.1.6'
developerId = 'semper-viventem'
developerName = 'constantine'
@@ -57,14 +57,14 @@ android {
}
ext {
- supportVersion = '28.0.0-rc01'
- kotlin_version = '1.2.50'
+ kotlin_version = '1.3.20'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "com.android.support:appcompat-v7:$supportVersion"
+ // Android X
+ implementation "androidx.appcompat:appcompat:1.1.0-alpha02"
// Kotlin
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
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 af85033..27a9be1 100644
--- a/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt
+++ b/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropBehavior.kt
@@ -3,11 +3,12 @@ package ru.semper_viventem.backdrop
import android.content.Context
import android.os.Bundle
import android.os.Parcelable
-import android.support.annotation.IdRes
-import android.support.design.widget.CoordinatorLayout
-import android.support.v7.widget.Toolbar
import android.util.AttributeSet
import android.view.View
+import android.view.ViewGroup
+import androidx.annotation.IdRes
+import androidx.appcompat.widget.Toolbar
+import androidx.coordinatorlayout.widget.CoordinatorLayout
class BackdropBehavior : CoordinatorLayout.Behavior {
@@ -30,18 +31,22 @@ class BackdropBehavior : CoordinatorLayout.Behavior {
private const val ARG_DROP_STATE = "arg_drop_state"
}
+ private var utils = BackdropUtils()
+
private var toolbarId: Int? = null
- private var backContainerId: Int? = null
+ private var backLayoutId: Int? = null
- private var child: View? = null
private var toolbar: Toolbar? = null
- private var backContainer: View? = null
+ private var backLayout: ViewGroup? = null
+ private var frontLayout: View? = null
private var closedIconId: Int = R.drawable.ic_menu
private var openedIconRes: Int = R.drawable.ic_close
private var dropState: DropState = DEFAULT_DROP_STATE
+ private var needToInitializing = true
+
private var dropListeners = mutableListOf()
constructor() : super()
@@ -61,25 +66,35 @@ class BackdropBehavior : CoordinatorLayout.Behavior {
}
override fun layoutDependsOn(parent: CoordinatorLayout, child: View, dependency: View): Boolean {
- if (toolbarId == null || backContainerId == null) return false
+ if (toolbarId == null && backLayoutId == null) return false
return when (dependency.id) {
toolbarId -> true
- backContainerId -> true
+ backLayoutId -> true
else -> false
}
}
override fun onDependentViewChanged(parent: CoordinatorLayout, child: View, dependency: View): Boolean {
- this.child = child
+ this.frontLayout = child as? ViewGroup ?: throw IllegalArgumentException("BackLayout must extend a ViewGroup")
+
when (dependency.id) {
- toolbarId -> toolbar = dependency as Toolbar
- backContainerId -> backContainer = dependency
+ toolbarId -> toolbar = dependency as? Toolbar ?: throw IllegalArgumentException("toolbarId doesn't match Toolbar")
+
+ backLayoutId -> {
+ backLayout = dependency as? ViewGroup ?: throw IllegalArgumentException("backLayoutId doesn't match back Layout")
+
+ // TODO (next release): remove this conditional
+ if (toolbarId == null) {
+ toolbar = utils.findToolbar(backLayout!!)
+ ?: throw IllegalArgumentException("AppBarLayout mast contain a Toolbar!")
+ }
+ }
}
- if (toolbar != null && backContainer != null) {
- initViews(parent, child, toolbar!!, backContainer!!)
+ if (toolbar != null && frontLayout != null && backLayout != null && needToInitializing) {
+ initViews(parent, frontLayout!!, toolbar!!, backLayout!!)
}
return super.onDependentViewChanged(parent, child, dependency)
@@ -93,12 +108,28 @@ class BackdropBehavior : CoordinatorLayout.Behavior {
this.closedIconId = iconRes
}
+ /**
+ * Attach back layout to Backdrop.
+ * BackDropLayout must contain a [Toolbar]
+ */
+ fun attachBackLayout(@IdRes appBarLayoutId: Int) {
+ this.backLayoutId = appBarLayoutId
+ }
+
+ /**
+ * @deprecated — use [BackdropBehavior.attachBackLayout]. This method will be removed in version 0.1.7+
+ */
+ @Deprecated("Use BackdropBehavior.attachBackLayout")
fun attachToolbar(@IdRes toolbarId: Int) {
this.toolbarId = toolbarId
}
+ /**
+ * @deprecated — use [BackdropBehavior.attachBackLayout]. This method will be removed in version 0.1.7+
+ */
+ @Deprecated("Use BackdropBehavior.attachBackLayout")
fun attachBackContainer(@IdRes backContainerId: Int) {
- this.backContainerId = backContainerId
+ this.backLayoutId = backContainerId
}
fun addOnDropListener(listener: OnDropListener) {
@@ -113,8 +144,8 @@ class BackdropBehavior : CoordinatorLayout.Behavior {
false
} else {
dropState = DropState.OPEN
- if (child != null && toolbar != null && backContainer != null) {
- drawDropState(child!!, toolbar!!, backContainer!!, withAnimation)
+ if (backLayout != null && toolbar != null && frontLayout != null) {
+ drawDropState(frontLayout!!, toolbar!!, backLayout!!, withAnimation)
} else {
throw IllegalArgumentException("Toolbar and backContainer must be initialized")
}
@@ -126,8 +157,8 @@ class BackdropBehavior : CoordinatorLayout.Behavior {
false
} else {
dropState = DropState.CLOSE
- if (child != null && toolbar != null && backContainer != null) {
- drawDropState(child!!, toolbar!!, backContainer!!, withAnimation)
+ if (backLayout != null && toolbar != null && frontLayout != null) {
+ drawDropState(frontLayout!!, toolbar!!, backLayout!!, withAnimation)
} else {
throw IllegalArgumentException("Toolbar and backContainer must be initialized")
}
@@ -135,10 +166,15 @@ class BackdropBehavior : CoordinatorLayout.Behavior {
true
}
- private fun initViews(parent: CoordinatorLayout, child: View, toolbar: Toolbar, backContainer: View) {
- backContainer.y = toolbar.y + toolbar.height
- child.layoutParams.height = parent.height - toolbar.height
- drawDropState(child, toolbar, backContainer, false)
+ private fun initViews(parent: CoordinatorLayout, frontLayout: View, toolbar: Toolbar, backLayout: View) {
+
+ // TODO (next release): remove this block
+ if (toolbarId != null) {
+ backLayout.y = toolbar.y + toolbar.height
+ }
+
+ frontLayout.layoutParams.height = parent.height - calculateTopPosition(backLayout, toolbar).toInt()
+ drawDropState(frontLayout, toolbar, backLayout, false)
with(toolbar) {
setNavigationOnClickListener {
@@ -146,37 +182,52 @@ class BackdropBehavior : CoordinatorLayout.Behavior {
DropState.CLOSE -> DropState.OPEN
DropState.OPEN -> DropState.CLOSE
}
- drawDropState(child, toolbar, backContainer)
+ drawDropState(frontLayout, toolbar, backLayout)
notifyListeners(true)
}
}
+
+ needToInitializing = false
}
- private fun drawDropState(child: View, toolbar: Toolbar, backContainer: View, withAnimation: Boolean = true) {
+ private fun drawDropState(frontLayout: View, toolbar: Toolbar, backContainer: View, withAnimation: Boolean = true) {
when (dropState) {
DropState.CLOSE -> {
- drawClosedState(child, backContainer, withAnimation)
+ drawClosedState(frontLayout, backContainer, toolbar, withAnimation)
toolbar.setNavigationIcon(closedIconId)
}
DropState.OPEN -> {
- drawOpenedState(child, backContainer, withAnimation)
+ drawOpenedState(frontLayout, backContainer, withAnimation)
toolbar.setNavigationIcon(openedIconRes)
}
}
}
- private fun drawClosedState(child: View, backContainer: View, withAnimation: Boolean = true) {
- val position = backContainer.y
+ private fun drawClosedState(frontLayout: View, backLayout: View, toolbar: Toolbar, withAnimation: Boolean = true) {
+ val position = calculateTopPosition(backLayout, toolbar)
val duration = if (withAnimation) DEFAULT_DURATION else WITHOUT_DURATION
- child.animate().y(position).setDuration(duration).start()
+ frontLayout.animate().y(position).setDuration(duration).start()
}
- private fun drawOpenedState(child: View, backContainer: View, withAnimation: Boolean = true) {
- val position = backContainer.y + backContainer.height
+ private fun drawOpenedState(frontLayout: View, backLayout: View, withAnimation: Boolean = true) {
+ val position = calculateBottomPosition(backLayout)
val duration = if (withAnimation) DEFAULT_DURATION else WITHOUT_DURATION
- child.animate().y(position).setDuration(duration).start()
+ frontLayout.animate().y(position).setDuration(duration).start()
+ }
+
+ private fun calculateTopPosition(backLayout: View, toolbar: Toolbar): Float {
+ // TODO (next release): remove this block
+ return if (toolbarId != null) {
+ backLayout.y
+ } else {
+ (backLayout.y + toolbar.y + toolbar.height)
+ }
+ }
+
+ private fun calculateBottomPosition(backLayout: View): Float {
+ return backLayout.y + backLayout.height
}
private fun notifyListeners(fromUser: Boolean) {
diff --git a/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropUtils.kt b/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropUtils.kt
new file mode 100644
index 0000000..f69d5f5
--- /dev/null
+++ b/backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropUtils.kt
@@ -0,0 +1,18 @@
+package ru.semper_viventem.backdrop
+
+import android.view.ViewGroup
+import androidx.appcompat.widget.Toolbar
+
+internal class BackdropUtils {
+
+ fun findToolbar(viewGroup: ViewGroup): Toolbar? {
+ for (chileId in 0..viewGroup.childCount) {
+ val childView = viewGroup.getChildAt(chileId)
+ if (childView is Toolbar) {
+ return childView
+ }
+ }
+
+ return null
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index e5ea96e..64e05f7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.2.50'
+ ext.kotlin_version = '1.3.20'
repositories {
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.4'
+ classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
diff --git a/gradle.properties b/gradle.properties
index 743d692..b0fa301 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -7,6 +7,8 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
+android.useAndroidX = true
+android.enableJetifier = true
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 4329a2d..e84047a 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Jul 19 19:46:00 MSK 2018
+#Sun Feb 10 20:17:37 MSK 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
diff --git a/sample/build.gradle b/sample/build.gradle
index 954e6e3..0107386 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -14,7 +14,6 @@ android {
targetSdkVersion 28
versionCode 1
versionName "1.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -28,39 +27,23 @@ android {
}
}
-ext {
- supportVersion = '28.0.0-rc01'
- retrofitVersion = '2.2.0'
- conductorVersion = "2.1.4"
- playServicesVersion = "15.0.0"
-}
-
androidExtensions {
experimental = true
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
- // Support
- implementation "com.android.support:appcompat-v7:$supportVersion"
- implementation "com.android.support:design:$supportVersion"
- implementation "com.android.support:recyclerview-v7:$supportVersion"
- implementation "com.android.support:cardview-v7:$supportVersion"
- implementation 'com.android.support.constraint:constraint-layout:1.1.2'
- // Material Components
- // implementation "com.google.android.material:material:1.0.0-alpha1"
+
+ // Android X
+ implementation "androidx.appcompat:appcompat:1.1.0-alpha02"
+ implementation "androidx.constraintlayout:constraintlayout:1.1.3"
+ implementation "com.google.android.material:material:1.1.0-alpha03"
+
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- // Tests
- testImplementation 'junit:junit:4.12'
- 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.7.1'
+
// Images
- implementation 'com.github.bumptech.glide:glide:4.6.1'
- kapt 'com.github.bumptech.glide:compiler:4.7.1'
- // Lists
- implementation 'com.hannesdorfmann:adapterdelegates3:3.0.1'
+ implementation 'com.github.bumptech.glide:glide:4.8.0'
+
implementation project(':backdrop')
}
diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/extensions.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/extensions.kt
index 0ed258d..93c93a2 100644
--- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/extensions.kt
+++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/extensions.kt
@@ -1,16 +1,14 @@
package ru.semper_viventem.backdropview
import android.content.Context
-import android.support.annotation.LayoutRes
-import android.support.design.widget.CoordinatorLayout
-import android.support.design.widget.CoordinatorLayout.Behavior
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager
import android.widget.ImageView
+import androidx.annotation.LayoutRes
+import androidx.coordinatorlayout.widget.CoordinatorLayout
import com.bumptech.glide.Glide
-import com.bumptech.glide.request.RequestOptions
fun ViewGroup.inflate(@LayoutRes layoutRes: Int, attachToRoot: Boolean = false): View {
@@ -34,15 +32,9 @@ fun View.showKeyboard(show: Boolean) {
}
fun ImageView.load(
- url: String?,
- round: Boolean = false
+ url: String?
) {
- Glide.with(context)
+ Glide.with(this)
.load(url)
- .apply {
- if (round) {
- apply(RequestOptions.circleCropTransform())
- }
- }
.into(this)
}
\ No newline at end of file
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 57eff5b..c9adab3 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
@@ -1,9 +1,9 @@
package ru.semper_viventem.backdropview.ui
import android.os.Bundle
-import android.support.annotation.IdRes
-import android.support.v4.app.Fragment
-import android.support.v7.app.AppCompatActivity
+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
@@ -21,7 +21,7 @@ class MainActivity : AppCompatActivity() {
private const val MENU_TEXT = R.id.menuText
private const val MENU_LIST = R.id.menuList
- private const val FRAGMENT_CONTAINER = R.id.foregroundContainer
+ private const val FRAGMENT_CONTAINER = R.id.frontLayout
private const val DEFAULT_ITEM = MENU_GALLERY
}
@@ -32,10 +32,9 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
- backdropBehavior = foregroundContainer.findBehavior()
+ backdropBehavior = frontLayout.findBehavior()
with(backdropBehavior) {
- attachBackContainer(R.id.backContainer)
- attachToolbar(R.id.toolbar)
+ attachBackLayout(R.id.backLayout)
}
with(toolbar) {
setTitle(R.string.app_name)
diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/common/BaseListAdapter.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/common/BaseListAdapter.kt
index 0f589cc..c16e9ae 100644
--- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/common/BaseListAdapter.kt
+++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/common/BaseListAdapter.kt
@@ -1,7 +1,7 @@
package ru.semper_viventem.backdropview.ui.common
-import android.support.v7.util.DiffUtil
-import android.support.v7.widget.RecyclerView
+import androidx.recyclerview.widget.DiffUtil
+import androidx.recyclerview.widget.RecyclerView
/**
* Easy to use base adapter for lists with single item type.
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 b201c92..a17654e 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,10 +1,10 @@
package ru.semper_viventem.backdropview.ui.common
import android.os.Bundle
-import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import androidx.fragment.app.Fragment
abstract class Screen : Fragment {
diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/gallery/GalleryAdapter.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/gallery/GalleryAdapter.kt
index 78faf63..da0f23a 100644
--- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/gallery/GalleryAdapter.kt
+++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/gallery/GalleryAdapter.kt
@@ -1,8 +1,8 @@
package ru.semper_viventem.backdropview.ui.gallery
-import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.item_gallery.view.*
import ru.semper_viventem.backdropview.R
import ru.semper_viventem.backdropview.inflate
diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/gallery/GalleryScreen.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/gallery/GalleryScreen.kt
index 067a1ab..650e099 100644
--- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/gallery/GalleryScreen.kt
+++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/gallery/GalleryScreen.kt
@@ -1,9 +1,9 @@
package ru.semper_viventem.backdropview.ui.gallery
-import android.support.v7.widget.DividerItemDecoration
-import android.support.v7.widget.GridLayoutManager
-import android.support.v7.widget.LinearSnapHelper
import android.view.View
+import androidx.recyclerview.widget.DividerItemDecoration
+import androidx.recyclerview.widget.GridLayoutManager
+import androidx.recyclerview.widget.LinearSnapHelper
import kotlinx.android.synthetic.main.screen_gallery.view.*
import ru.semper_viventem.backdropview.R
import ru.semper_viventem.backdropview.ui.common.Screen
diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/list/ListItemsAdapter.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/list/ListItemsAdapter.kt
index 53a4a66..76ac4dd 100644
--- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/list/ListItemsAdapter.kt
+++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/list/ListItemsAdapter.kt
@@ -1,8 +1,8 @@
package ru.semper_viventem.backdropview.ui.list
-import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.item_list.view.*
import ru.semper_viventem.backdropview.R
import ru.semper_viventem.backdropview.inflate
diff --git a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/list/ListScreen.kt b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/list/ListScreen.kt
index b7c8d14..d32d968 100644
--- a/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/list/ListScreen.kt
+++ b/sample/src/main/kotlin/ru/semper_viventem/backdropview/ui/list/ListScreen.kt
@@ -1,7 +1,7 @@
package ru.semper_viventem.backdropview.ui.list
-import android.support.v7.widget.LinearLayoutManager
import android.view.View
+import androidx.recyclerview.widget.LinearLayoutManager
import kotlinx.android.synthetic.main.screen_list.view.*
import ru.semper_viventem.backdropview.R
import ru.semper_viventem.backdropview.ui.common.Screen
diff --git a/sample/src/main/res/layout/activity_main.xml b/sample/src/main/res/layout/activity_main.xml
index a5f0462..96ba40f 100644
--- a/sample/src/main/res/layout/activity_main.xml
+++ b/sample/src/main/res/layout/activity_main.xml
@@ -1,5 +1,5 @@
-
-
-
-
-
+
+
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sample/src/main/res/layout/item_gallery.xml b/sample/src/main/res/layout/item_gallery.xml
index 415245a..8173d4a 100644
--- a/sample/src/main/res/layout/item_gallery.xml
+++ b/sample/src/main/res/layout/item_gallery.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sample/src/main/res/layout/item_list.xml b/sample/src/main/res/layout/item_list.xml
index 1fc1dbe..43d140e 100644
--- a/sample/src/main/res/layout/item_list.xml
+++ b/sample/src/main/res/layout/item_list.xml
@@ -1,5 +1,5 @@
-
-
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sample/src/main/res/layout/screen_gallery.xml b/sample/src/main/res/layout/screen_gallery.xml
index 67bb476..5e51a09 100644
--- a/sample/src/main/res/layout/screen_gallery.xml
+++ b/sample/src/main/res/layout/screen_gallery.xml
@@ -1,5 +1,5 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sample/src/main/res/layout/screen_list.xml b/sample/src/main/res/layout/screen_list.xml
index 6bc2446..42352ab 100644
--- a/sample/src/main/res/layout/screen_list.xml
+++ b/sample/src/main/res/layout/screen_list.xml
@@ -1,5 +1,5 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sample/src/main/res/layout/screen_text.xml b/sample/src/main/res/layout/screen_text.xml
index b7f47ed..56ac96f 100644
--- a/sample/src/main/res/layout/screen_text.xml
+++ b/sample/src/main/res/layout/screen_text.xml
@@ -1,5 +1,5 @@
-
-
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sample/src/main/res/values/styles.xml b/sample/src/main/res/values/styles.xml
index 0eb88fe..bdfe33e 100644
--- a/sample/src/main/res/values/styles.xml
+++ b/sample/src/main/res/values/styles.xml
@@ -1,7 +1,7 @@
-