diff --git a/build.gradle b/build.gradle index dea94eb..4f0543e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,18 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { + google() jcenter() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:1.5.0' + classpath 'com.android.tools.build:gradle:3.4.2' } } allprojects { repositories { + google() jcenter() mavenCentral() } diff --git a/caldroid/build.gradle b/caldroid/build.gradle index c81d80b..a6673a1 100644 --- a/caldroid/build.gradle +++ b/caldroid/build.gradle @@ -1,18 +1,19 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 22 - buildToolsVersion "22.0.1" + compileSdkVersion 28 + buildToolsVersion "28.0.3" defaultConfig { - minSdkVersion 8 - targetSdkVersion 22 + minSdkVersion 14 + targetSdkVersion 28 } } dependencies { - compile 'com.android.support:support-v4:22.2.0' - compile 'com.darwinsys:hirondelle-date4j:1.5.1' + implementation 'com.android.support:support-v4:28.0.0' + implementation 'com.android.support:design:28.0.0' + implementation 'com.darwinsys:hirondelle-date4j:1.5.1' } apply from: 'https://raw.githubusercontent.com/shamanland/gradle-mvn-push/cc18d56549cdea03f744b6fff27911569394073e/gradle-mvn-push.gradle' \ No newline at end of file diff --git a/caldroid/src/main/java/com/roomorama/caldroid/CellView.java b/caldroid/src/main/java/com/roomorama/caldroid/CellView.java index 1775813..e5a1318 100644 --- a/caldroid/src/main/java/com/roomorama/caldroid/CellView.java +++ b/caldroid/src/main/java/com/roomorama/caldroid/CellView.java @@ -2,7 +2,6 @@ import android.content.Context; import android.util.AttributeSet; -import android.widget.TextView; import com.caldroid.R; import java.util.ArrayList; @@ -10,14 +9,14 @@ /** * Created by crocodile2u on 3/30/15. */ -public class CellView extends TextView { +public class CellView extends android.support.v7.widget.AppCompatTextView { public static final int STATE_TODAY = R.attr.state_date_today; public static final int STATE_SELECTED = R.attr.state_date_selected; public static final int STATE_DISABLED = R.attr.state_date_disabled; public static final int STATE_PREV_NEXT_MONTH = R.attr.state_date_prev_next_month; - private ArrayList customStates = new ArrayList(); + private ArrayList customStates = new ArrayList<>(); public CellView(Context context) { super(context); @@ -34,7 +33,7 @@ public CellView(Context context, AttributeSet attrs) { } private void init() { - if (null == customStates) customStates = new ArrayList(); + if (null == customStates) customStates = new ArrayList<>(); } public void resetCustomStates() { diff --git a/caldroid/src/main/res/layout/calendar_view.xml b/caldroid/src/main/res/layout/calendar_view.xml index 4509360..c7d670b 100644 --- a/caldroid/src/main/res/layout/calendar_view.xml +++ b/caldroid/src/main/res/layout/calendar_view.xml @@ -11,7 +11,7 @@ android:layout_height="wrap_content" android:orientation="horizontal"> -