diff --git a/.gitignore b/.gitignore
index 9c4de58..f23280a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,55 @@
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-/captures
+# Built application files
+*.apk
+*.ap_
+
+# Files for the ART/Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+out/
+
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+# Android Studio Navigation editor temp files
+.navigation/
+
+# Android Studio captures folder
+captures/
+
+# Intellij
+*.iml
+.idea/workspace.xml
+.idea/tasks.xml
+.idea/gradle.xml
+.idea/dictionaries
+.idea/libraries
+
+# Keystore files
+*.jks
+
+# External native build folder generated in Android Studio 2.2 and later
+.externalNativeBuild
+
+# Google Services (e.g. APIs or Firebase)
+google-services.json
+
+# Freeline
+freeline.py
+freeline/
+freeline_project_description.json
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index f0d60be..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-LabDesignLibrary
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index 96cc43e..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index 97626ba..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
deleted file mode 100644
index 7d80135..0000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 1a3eaff..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index d99954c..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Lab-Android-DesignLibrary.iml b/Lab-Android-DesignLibrary.iml
deleted file mode 100644
index 6d7bde6..0000000
--- a/Lab-Android-DesignLibrary.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
deleted file mode 100644
index 796b96d..0000000
--- a/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/app/app.iml b/app/app.iml
deleted file mode 100644
index 23ab90b..0000000
--- a/app/app.iml
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- generateDebugAndroidTestSources
- generateDebugSources
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index ce77714..13e9a31 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 23
- buildToolsVersion "23.0.1"
+ compileSdkVersion 26
+ buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.inthecheesefactory.lab.designlibrary"
minSdkVersion 15
- targetSdkVersion 23
+ targetSdkVersion 26
versionCode 1
versionName "1.0"
}
@@ -21,5 +21,5 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:design:23.1.0'
+ compile 'com.android.support:design:26.1.0'
}
diff --git a/app/src/main/java/com/inthecheesefactory/lab/designlibrary/CodeLabActivity.java b/app/src/main/java/com/inthecheesefactory/lab/designlibrary/CodeLabActivity.java
index 33481c5..e35572a 100644
--- a/app/src/main/java/com/inthecheesefactory/lab/designlibrary/CodeLabActivity.java
+++ b/app/src/main/java/com/inthecheesefactory/lab/designlibrary/CodeLabActivity.java
@@ -22,14 +22,25 @@ protected void onCreate(Bundle savedInstanceState) {
}
private void initInstances() {
- drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
+ // Class casting no longer needed for support library v26+
+// drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
+ drawerLayout = findViewById(R.id.drawerLayout);
drawerToggle = new ActionBarDrawerToggle(CodeLabActivity.this, drawerLayout, R.string.hello_world, R.string.hello_world);
- drawerLayout.setDrawerListener(drawerToggle);
+ // setDrawerListener is deprecated, use addDrawerListener and removeDrawerListener instead
+// drawerLayout.setDrawerListener(drawerToggle);
+ drawerLayout.addDrawerListener(drawerToggle);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ // setDrawerListener is deprecated, use addDrawerListener and removeDrawerListener instead
+ drawerLayout.removeDrawerListener(drawerToggle);
+ }
+
@Override
public void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
diff --git a/app/src/main/java/com/inthecheesefactory/lab/designlibrary/MainActivity.java b/app/src/main/java/com/inthecheesefactory/lab/designlibrary/MainActivity.java
index 9677fe6..5ad984d 100644
--- a/app/src/main/java/com/inthecheesefactory/lab/designlibrary/MainActivity.java
+++ b/app/src/main/java/com/inthecheesefactory/lab/designlibrary/MainActivity.java
@@ -35,21 +35,31 @@ protected void onCreate(Bundle savedInstanceState) {
}
private void initToolbar() {
- toolbar = (Toolbar) findViewById(R.id.toolbar);
+ // Class casting no longer needed for support library v26+
+// toolbar = (Toolbar) findViewById(R.id.toolbar);
+ toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
}
private void initInstances() {
- drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
+ // Class casting no longer needed for support library v26+
+// drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
+ drawerLayout = findViewById(R.id.drawerLayout);
drawerToggle = new ActionBarDrawerToggle(MainActivity.this, drawerLayout, R.string.hello_world, R.string.hello_world);
- drawerLayout.setDrawerListener(drawerToggle);
+ // setDrawerListener is deprecated, use addDrawerListener and removeDrawerListener instead
+// drawerLayout.setDrawerListener(drawerToggle);
+ drawerLayout.addDrawerListener(drawerToggle);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- rootLayout = (CoordinatorLayout) findViewById(R.id.rootLayout);
+ // Class casting no longer needed for support library v26+
+// rootLayout = (CoordinatorLayout) findViewById(R.id.rootLayout);
+ rootLayout = findViewById(R.id.rootLayout);
- fabBtn = (FloatingActionButton) findViewById(R.id.fabBtn);
+ // Class casting no longer needed for support library v26+
+// fabBtn = (FloatingActionButton) findViewById(R.id.fabBtn);
+ fabBtn = findViewById(R.id.fabBtn);
fabBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -64,10 +74,19 @@ public void onClick(View v) {
}
});
- collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingToolbarLayout);
+ // Class casting no longer needed for support library v26+
+// collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingToolbarLayout);
+ collapsingToolbarLayout = findViewById(R.id.collapsingToolbarLayout);
collapsingToolbarLayout.setTitle("Design Library");
}
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ // setDrawerListener is deprecated, use addDrawerListener and removeDrawerListener instead
+ drawerLayout.removeDrawerListener(drawerToggle);
+ }
+
@Override
public void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 8f0dd00..aebe741 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -74,7 +74,7 @@
android:hint="Password" />
-
+
@@ -84,12 +84,13 @@
android:id="@+id/fabBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="bottom|right"
+ android:layout_gravity="bottom|right|end"
android:layout_marginBottom="@dimen/fab_margin_bottom"
android:layout_marginRight="@dimen/fab_margin_right"
android:src="@drawable/ic_plus"
app:borderWidth="0dp"
- app:fabSize="normal" />
+ app:fabSize="normal"
+ app:useCompatPadding="true" />
diff --git a/app/src/main/res/values-v21/dimens.xml b/app/src/main/res/values-v21/dimens.xml
deleted file mode 100644
index 4e8ad39..0000000
--- a/app/src/main/res/values-v21/dimens.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
- 16dp
- 16dp
-
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 82dfd04..0666a72 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -3,8 +3,8 @@
16dp
16dp
- 0.1dp
- 0.1dp
+ 16dp
+ 16dp
256dp
192dp
diff --git a/build.gradle b/build.gradle
index 9405f3f..6b65a86 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
+ maven { url 'https://maven.google.com' }
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
+ classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -15,5 +16,6 @@ buildscript {
allprojects {
repositories {
jcenter()
+ maven { url 'https://maven.google.com' }
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index ff08662..0a091cf 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip