├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_content_add.png │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_content_add.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_content_add.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── ic_content_add.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ └── ic_content_add.png │ │ │ ├── values │ │ │ │ ├── ids.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── layout │ │ │ │ ├── content_main.xml │ │ │ │ ├── empty_view.xml │ │ │ │ ├── todo_item.xml │ │ │ │ ├── fragment_todos.xml │ │ │ │ └── activity_main.xml │ │ │ └── menu │ │ │ │ └── menu_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── easy │ │ │ │ └── kotlin │ │ │ │ └── mytodoapplication │ │ │ │ └── TAG.java │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── easy │ │ │ │ └── kotlin │ │ │ │ └── mytodoapplication │ │ │ │ ├── model │ │ │ │ └── Todo.kt │ │ │ │ ├── MyTodoApplication.kt │ │ │ │ ├── TodoAdapter.kt │ │ │ │ ├── TodosFragment.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ └── TodoEditFragment.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── easy │ │ │ └── kotlin │ │ │ └── mytodoapplication │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── easy │ │ └── kotlin │ │ └── mytodoapplication │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── gradlew └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_content_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/drawable-hdpi/ic_content_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_content_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/drawable-mdpi/ic_content_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_content_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/drawable-xhdpi/ic_content_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_content_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_content_add.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_content_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_content_add.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EasyKotlin/chapter13_kotlin_android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/easy/kotlin/mytodoapplication/TAG.java: -------------------------------------------------------------------------------- 1 | package com.easy.kotlin.mytodoapplication; 2 | 3 | /** 4 | * Created by jack on 2017/7/20. 5 | */ 6 | 7 | public class TAG { 8 | public static final String MY_TAG = "MY_TODOS"; 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #f2fced 4 | #456a7c 5 | #8fb3c4 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jul 20 23:39:17 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 我的日程 3 | 设置 4 | 暂无待办事项,请添加 5 | 标题 6 | 待办内容 7 | 添加 8 | 保存 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/kotlin/com/easy/kotlin/mytodoapplication/model/Todo.kt: -------------------------------------------------------------------------------- 1 | package com.easy.kotlin.mytodoapplication.model 2 | 3 | import io.realm.RealmObject 4 | import io.realm.annotations.PrimaryKey 5 | import io.realm.annotations.RealmClass 6 | 7 | /** 8 | * Created by jack on 2017/7/21. 9 | */ 10 | @RealmClass 11 | open class Todo : RealmObject() { 12 | @PrimaryKey 13 | open var id: String = "-1" 14 | open var title: String = "日程" 15 | open var content: String = "事项" 16 | } 17 | -------------------------------------------------------------------------------- /app/src/test/java/com/easy/kotlin/mytodoapplication/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.easy.kotlin.mytodoapplication; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/empty_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |