diff --git a/.gitignore b/.gitignore
index 429303ec..31777652 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@ key.jks
/local.properties
/.idea/workspace.xml
/.idea/libraries
+/.idea
.DS_Store
/build
/captures
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index 96cc43ef..00000000
--- 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 e7bedf33..00000000
--- 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 97626ba4..00000000
--- 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 dfc10add..00000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index dc492c94..00000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 3b312839..00000000
--- a/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 4a04528f..00000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 4f408183..00000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460d..00000000
--- 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 94a25f7f..00000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index bb1651ec..f13edaa1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,4 +1,7 @@
apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+apply plugin: 'kotlin-kapt'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
@@ -41,4 +44,5 @@ dependencies {
//内存泄漏测试
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.2'
+ kapt 'com.android.databinding:compiler:3.0.0'
}
diff --git a/app/src/main/java/com/goldze/mvvmhabit/ui/activity/DemoActivity.java b/app/src/main/java/com/goldze/mvvmhabit/ui/activity/DemoActivity.java
index 7bd31f57..1544a618 100644
--- a/app/src/main/java/com/goldze/mvvmhabit/ui/activity/DemoActivity.java
+++ b/app/src/main/java/com/goldze/mvvmhabit/ui/activity/DemoActivity.java
@@ -108,5 +108,12 @@ public void onError(Throwable e) {
progressDialog.dismiss();
}
});
+
}
+
+ @Override
+ public boolean supportSlideBack() {
+ return false;
+ }
+
}
diff --git a/app/src/main/java/com/goldze/mvvmhabit/ui/activity/LoginActivity.java b/app/src/main/java/com/goldze/mvvmhabit/ui/activity/LoginActivity.java
index 9ba4f659..0a13f30b 100644
--- a/app/src/main/java/com/goldze/mvvmhabit/ui/activity/LoginActivity.java
+++ b/app/src/main/java/com/goldze/mvvmhabit/ui/activity/LoginActivity.java
@@ -54,4 +54,9 @@ public void onPropertyChanged(Observable observable, int i) {
}
});
}
+
+ @Override
+ public boolean supportSlideBack() {
+ return false;
+ }
}
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index d8a43aad..6d76290c 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -13,6 +13,7 @@
- @color/colorAccent
- @color/white
+ - true