Migrazione ad AndroidX.

Implementazione dialog per Exceptions non gestite.
This commit is contained in:
Gius95
2018-12-13 19:47:00 +01:00
parent d4ce614ab5
commit d5723df178
122 changed files with 721 additions and 686 deletions

View File

@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 27
compileSdkVersion 28
@@ -12,7 +12,7 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -26,16 +26,14 @@ android {
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(include: ['*.jar'], dir: 'libs')
// google
implementation "com.android.support:cardview-v7:27.1.1"
implementation "com.android.support:design:27.1.1"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha01'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
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'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {

View File

@@ -1,8 +1,8 @@
package it.integry.plugins.waterfalltoolbar;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -4,13 +4,12 @@ import android.content.Context
import android.os.Build
import android.os.Parcel
import android.os.Parcelable
import android.support.annotation.RequiresApi
import android.support.v4.widget.NestedScrollView
import android.support.v7.widget.CardView
import android.support.v7.widget.RecyclerView
import androidx.annotation.RequiresApi
import androidx.core.widget.NestedScrollView
import android.util.AttributeSet
import android.view.View
import android.widget.ScrollView
import androidx.recyclerview.widget.RecyclerView
/**
* Created by Hugo Castelani
@@ -18,7 +17,7 @@ import android.widget.ScrollView
* Time: 19:30
*/
open class WaterfallToolbar : CardView {
open class WaterfallToolbar : androidx.cardview.widget.CardView {
init {
// set density to be able to use DimensionUnits
// this code must run before all the signings using DimensionUnits
@@ -28,7 +27,7 @@ open class WaterfallToolbar : CardView {
/**
* The recycler view whose scroll is going to be listened
*/
var recyclerView: RecyclerView? = null
var recyclerView: androidx.recyclerview.widget.RecyclerView? = null
set(value) {
field = value
addRecyclerViewScrollListener()
@@ -185,7 +184,7 @@ open class WaterfallToolbar : CardView {
private fun addRecyclerViewScrollListener() {
recyclerView?.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
// real position must always get updated
realPosition.value = realPosition.value + dy