├── 01.SQLite-Single-Table-CRUD ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── styles.xml │ │ │ │ │ └── strings.xml │ │ │ │ ├── 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_delete_black_24dp.png │ │ │ │ │ ├── ic_mode_edit_black_24dp.png │ │ │ │ │ ├── ic_person_add_white_24dp.png │ │ │ │ │ └── drawable-xxhdpi │ │ │ │ │ │ └── ic_add_subject.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ ├── ic_delete_black_24dp.png │ │ │ │ │ ├── ic_mode_edit_black_24dp.png │ │ │ │ │ └── ic_person_add_white_24dp.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── ic_delete_black_24dp.png │ │ │ │ │ ├── ic_mode_edit_black_24dp.png │ │ │ │ │ └── ic_person_add_white_24dp.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ ├── ic_delete_black_24dp.png │ │ │ │ │ ├── ic_mode_edit_black_24dp.png │ │ │ │ │ └── ic_person_add_white_24dp.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ ├── ic_delete_black_24dp.png │ │ │ │ │ ├── ic_mode_edit_black_24dp.png │ │ │ │ │ └── ic_person_add_white_24dp.png │ │ │ │ ├── drawable │ │ │ │ │ └── ic_delete_white_24dp.xml │ │ │ │ ├── menu │ │ │ │ │ └── menu_main.xml │ │ │ │ └── layout │ │ │ │ │ ├── activity_student_list.xml │ │ │ │ │ ├── content_main.xml │ │ │ │ │ ├── fragment_student_create_dialog.xml │ │ │ │ │ ├── fragment_student_update_dialog.xml │ │ │ │ │ └── student_info.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── hellohasan │ │ │ │ │ └── sqlite_project │ │ │ │ │ ├── Features │ │ │ │ │ ├── CreateStudent │ │ │ │ │ │ ├── StudentCreateListener.java │ │ │ │ │ │ ├── Student.java │ │ │ │ │ │ └── StudentCreateDialogFragment.java │ │ │ │ │ ├── UpdateStudentInfo │ │ │ │ │ │ └── StudentUpdateListener.java │ │ │ │ │ └── ShowStudentList │ │ │ │ │ │ └── CustomViewHolder.java │ │ │ │ │ ├── Util │ │ │ │ │ └── Config.java │ │ │ │ │ └── Database │ │ │ │ │ └── DatabaseHelper.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── hellohasan │ │ │ │ └── sqlite_project │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── hellohasan │ │ │ └── sqlite_project │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── .gitignore ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── gradle.properties └── gradlew.bat ├── 02.SQLite-Multiple-(Two)-Tables-CRUD ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── styles.xml │ │ │ │ │ └── strings.xml │ │ │ │ ├── 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 │ │ │ │ │ └── drawable-xxhdpi │ │ │ │ │ │ └── ic_add_subject.png │ │ │ │ ├── drawable │ │ │ │ │ ├── ic_delete_black_24dp.xml │ │ │ │ │ ├── ic_delete_white_24dp.xml │ │ │ │ │ ├── ic_subject_add_24dp.xml │ │ │ │ │ ├── ic_mode_edit_black_24dp.xml │ │ │ │ │ └── ic_person_add_white_24dp.xml │ │ │ │ ├── menu │ │ │ │ │ └── menu_main.xml │ │ │ │ └── layout │ │ │ │ │ ├── activity_subject_list.xml │ │ │ │ │ ├── activity_student_list.xml │ │ │ │ │ ├── content_main.xml │ │ │ │ │ ├── fragment_subject_create_dialog.xml │ │ │ │ │ ├── fragment_subject_update_dialog.xml │ │ │ │ │ ├── fragment_student_create_dialog.xml │ │ │ │ │ ├── fragment_student_update_dialog.xml │ │ │ │ │ ├── student_info.xml │ │ │ │ │ └── item_subject.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── hellohasan │ │ │ │ │ └── sqlite_project │ │ │ │ │ ├── Features │ │ │ │ │ ├── StudentCRUD │ │ │ │ │ │ ├── CreateStudent │ │ │ │ │ │ │ ├── StudentCreateListener.java │ │ │ │ │ │ │ ├── Student.java │ │ │ │ │ │ │ └── StudentCreateDialogFragment.java │ │ │ │ │ │ ├── UpdateStudentInfo │ │ │ │ │ │ │ └── StudentUpdateListener.java │ │ │ │ │ │ └── ShowStudentList │ │ │ │ │ │ │ └── CustomViewHolder.java │ │ │ │ │ └── SubjectCRUD │ │ │ │ │ │ ├── CreateSubject │ │ │ │ │ │ ├── SubjectCreateListener.java │ │ │ │ │ │ ├── Subject.java │ │ │ │ │ │ └── SubjectCreateDialogFragment.java │ │ │ │ │ │ ├── UpdateSubjectInfo │ │ │ │ │ │ └── SubjectUpdateListener.java │ │ │ │ │ │ └── ShowSubjectList │ │ │ │ │ │ └── CustomViewHolder.java │ │ │ │ │ ├── Util │ │ │ │ │ └── Config.java │ │ │ │ │ └── Database │ │ │ │ │ └── DatabaseHelper.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── hellohasan │ │ │ │ └── sqlite_project │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── hellohasan │ │ │ └── sqlite_project │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── .gitignore ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── gradle.properties └── gradlew.bat ├── 03.SQLite-Multiple-(Three)-Tables-CRUD ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── styles.xml │ │ │ │ │ └── strings.xml │ │ │ │ ├── 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 │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── drawable │ │ │ │ │ ├── ic_subject_24dp.xml │ │ │ │ │ ├── ic_delete_black_24dp.xml │ │ │ │ │ ├── ic_add_subject_24dp.xml │ │ │ │ │ ├── ic_edit_black_24dp.xml │ │ │ │ │ └── ic_person_add_24dp.xml │ │ │ │ ├── layout │ │ │ │ │ ├── activity_taken_subject.xml │ │ │ │ │ ├── layout_table_row_count.xml │ │ │ │ │ ├── activity_subject_list.xml │ │ │ │ │ ├── activity_student_list.xml │ │ │ │ │ ├── activity_subject_assign.xml │ │ │ │ │ ├── item_student_card_view.xml │ │ │ │ │ ├── content_subjects.xml │ │ │ │ │ ├── content_main.xml │ │ │ │ │ ├── item_subject_assign.xml │ │ │ │ │ ├── fragment_subject_update_dialog.xml │ │ │ │ │ ├── fragment_subject_create_dialog.xml │ │ │ │ │ ├── item_taken_subject.xml │ │ │ │ │ ├── fragment_student_create_dialog.xml │ │ │ │ │ ├── fragment_student_update_dialog.xml │ │ │ │ │ ├── item_subject_card_view.xml │ │ │ │ │ ├── layout_student_info.xml │ │ │ │ │ └── activity_student_taken_subject.xml │ │ │ │ ├── menu │ │ │ │ │ └── menu_main.xml │ │ │ │ └── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── hellohasan │ │ │ │ │ └── sqlite_multiple_three_tables_crud │ │ │ │ │ ├── database │ │ │ │ │ ├── QueryResponse.java │ │ │ │ │ ├── TableRowCountQueryImplementation.java │ │ │ │ │ ├── QueryContract.java │ │ │ │ │ └── DatabaseHelper.java │ │ │ │ │ ├── features │ │ │ │ │ ├── student_crud │ │ │ │ │ │ ├── StudentCrudListener.java │ │ │ │ │ │ └── student_list_show │ │ │ │ │ │ │ └── StudentViewHolder.java │ │ │ │ │ ├── subject_crud │ │ │ │ │ │ ├── SubjectCrudListener.java │ │ │ │ │ │ └── subject_list_show │ │ │ │ │ │ │ └── SubjectViewHolder.java │ │ │ │ │ └── taken_subject_crud │ │ │ │ │ │ ├── TakenSubjectCrudListener.java │ │ │ │ │ │ ├── subject_assign │ │ │ │ │ │ ├── SubjectAssignViewHolder.java │ │ │ │ │ │ ├── SubjectAssignActivity.java │ │ │ │ │ │ └── SubjectAssignListAdapter.java │ │ │ │ │ │ └── taken_subject_show │ │ │ │ │ │ ├── TakenSubjectViewHolder.java │ │ │ │ │ │ └── TakenSubjectListAdapter.java │ │ │ │ │ ├── util │ │ │ │ │ ├── MyApp.java │ │ │ │ │ └── Constants.java │ │ │ │ │ └── model │ │ │ │ │ ├── TakenSubject.java │ │ │ │ │ ├── TableRowCount.java │ │ │ │ │ ├── Subject.java │ │ │ │ │ └── Student.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── hellohasan │ │ │ │ └── sqlite_multiple_three_tables_crud │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── hellohasan │ │ │ └── sqlite_multiple_three_tables_crud │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── .gitignore ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── README.md ├── gradle.properties └── gradlew.bat ├── data ├── sqlite-app-screenshot.gif ├── Android-SQLite-Multiple-table-CRUD.gif └── Android-SQLite-three-table-tutorial.gif └── README.md /01.SQLite-Single-Table-CRUD/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /data/sqlite-app-screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/data/sqlite-app-screenshot.gif -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | -------------------------------------------------------------------------------- /data/Android-SQLite-Multiple-table-CRUD.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/data/Android-SQLite-Multiple-table-CRUD.gif -------------------------------------------------------------------------------- /data/Android-SQLite-three-table-tutorial.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/data/Android-SQLite-three-table-tutorial.gif -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-hdpi/ic_delete_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-hdpi/ic_delete_black_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-mdpi/ic_delete_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-mdpi/ic_delete_black_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xhdpi/ic_delete_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xhdpi/ic_delete_black_24dp.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-hdpi/ic_mode_edit_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-hdpi/ic_mode_edit_black_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-mdpi/ic_mode_edit_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-mdpi/ic_mode_edit_black_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxhdpi/ic_delete_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxhdpi/ic_delete_black_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxxhdpi/ic_delete_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxxhdpi/ic_delete_black_24dp.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-hdpi/ic_person_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-hdpi/ic_person_add_white_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-mdpi/ic_person_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-mdpi/ic_person_add_white_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xhdpi/ic_mode_edit_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xhdpi/ic_mode_edit_black_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xhdpi/ic_person_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xhdpi/ic_person_add_white_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxhdpi/ic_mode_edit_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxhdpi/ic_mode_edit_black_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxhdpi/ic_person_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxhdpi/ic_person_add_white_24dp.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxxhdpi/ic_mode_edit_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxxhdpi/ic_mode_edit_black_24dp.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxxhdpi/ic_person_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-xxxhdpi/ic_person_add_white_24dp.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-hdpi/drawable-xxhdpi/ic_add_subject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/01.SQLite-Single-Table-CRUD/app/src/main/res/drawable-hdpi/drawable-xxhdpi/ic_add_subject.png -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/drawable-hdpi/drawable-xxhdpi/ic_add_subject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasancse91/Android-SQLite-Tutorial/HEAD/02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/drawable-hdpi/drawable-xxhdpi/ic_add_subject.png -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/CreateStudent/StudentCreateListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.CreateStudent; 2 | 3 | public interface StudentCreateListener { 4 | void onStudentCreated(Student student); 5 | } 6 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/database/QueryResponse.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.database; 2 | 3 | public interface QueryResponse { 4 | void onSuccess(T data); 5 | void onFailure(String message); 6 | } -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Oct 31 11:10:54 BDT 2019 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-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/StudentCRUD/CreateStudent/StudentCreateListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.StudentCRUD.CreateStudent; 2 | 3 | public interface StudentCreateListener { 4 | void onStudentCreated(Student student); 5 | } 6 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/SubjectCRUD/CreateSubject/SubjectCreateListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.SubjectCRUD.CreateSubject; 2 | 3 | public interface SubjectCreateListener { 4 | void onSubjectCreated(Subject subject); 5 | } 6 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Oct 31 11:21:27 BDT 2019 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-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Oct 31 11:30:33 BDT 2019 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-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/features/student_crud/StudentCrudListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.features.student_crud; 2 | 3 | public interface StudentCrudListener { 4 | void onStudentListUpdate(boolean isUpdated); 5 | } 6 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/features/subject_crud/SubjectCrudListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.features.subject_crud; 2 | 3 | public interface SubjectCrudListener { 4 | void onSubjectListUpdate(boolean isUpdate); 5 | } 6 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #f1f1f1 7 | 8 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/features/taken_subject_crud/TakenSubjectCrudListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.features.taken_subject_crud; 2 | 3 | public interface TakenSubjectCrudListener { 4 | void onTakenSubjectUpdated(boolean isUpdated); 5 | } 6 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #efeaeaea 7 | #ffffff 8 | 9 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/UpdateStudentInfo/StudentUpdateListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.UpdateStudentInfo; 2 | 3 | import com.hellohasan.sqlite_project.Features.CreateStudent.Student; 4 | 5 | public interface StudentUpdateListener { 6 | void onStudentInfoUpdated(Student student, int position); 7 | } 8 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #efeaeaea 7 | #ffffff 8 | 9 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/SubjectCRUD/UpdateSubjectInfo/SubjectUpdateListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.SubjectCRUD.UpdateSubjectInfo; 2 | 3 | import com.hellohasan.sqlite_project.Features.SubjectCRUD.CreateSubject.Subject; 4 | 5 | public interface SubjectUpdateListener { 6 | void onSubjectInfoUpdate(Subject subject, int position); 7 | } 8 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/StudentCRUD/UpdateStudentInfo/StudentUpdateListener.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.StudentCRUD.UpdateStudentInfo; 2 | 3 | import com.hellohasan.sqlite_project.Features.StudentCRUD.CreateStudent.Student; 4 | 5 | public interface StudentUpdateListener { 6 | void onStudentInfoUpdated(Student student, int position); 7 | } 8 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/drawable/ic_subject_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/drawable/ic_delete_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/drawable/ic_delete_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/drawable/ic_delete_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/drawable/ic_delete_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/drawable/ic_subject_add_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/drawable/ic_add_subject_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/util/MyApp.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.util; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | public class MyApp extends Application { 7 | 8 | public static Context context = null; 9 | 10 | @Override 11 | public void onCreate() { 12 | super.onCreate(); 13 | context = getApplicationContext(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/model/TakenSubject.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.model; 2 | 3 | public class TakenSubject extends Subject{ 4 | 5 | private boolean isTaken; 6 | 7 | public TakenSubject(int id, String name, int code, double credit, boolean isTaken) { 8 | super(id, name, code, credit); 9 | this.isTaken = isTaken; 10 | } 11 | 12 | public boolean isTaken() { 13 | return isTaken; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/layout/activity_taken_subject.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/test/java/com/hellohasan/sqlite_project/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project; 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 | } -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/drawable/ic_edit_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/drawable/ic_person_add_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/drawable/ic_mode_edit_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/drawable/ic_person_add_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/test/java/com/hellohasan/sqlite_project/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project; 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 | } -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/test/java/com/hellohasan/sqlite_multiple_three_tables_crud/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud; 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 | } -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.1' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | jcenter() 19 | google() 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } 26 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.1' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | jcenter() 19 | google() 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } 26 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.5.1' 11 | 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/model/TableRowCount.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.model; 2 | 3 | public class TableRowCount { 4 | private long studentRow; 5 | private long subjectRow; 6 | private long takenSubjectRow; 7 | 8 | public TableRowCount(long studentRow, long subjectRow, long takenSubjectRow) { 9 | this.studentRow = studentRow; 10 | this.subjectRow = subjectRow; 11 | this.takenSubjectRow = takenSubjectRow; 12 | } 13 | 14 | public long getStudentRow() { 15 | return studentRow; 16 | } 17 | 18 | public long getSubjectRow() { 19 | return subjectRow; 20 | } 21 | 22 | public long getTakenSubjectRow() { 23 | return takenSubjectRow; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/README.md: -------------------------------------------------------------------------------- 1 | # Android SQLite Multiple (Three) Tables CRUD Tutorial 2 | 3 | We'll design this type of sample Android App using `SQLite` database to store data. Here I've created three tables `student`, `subject` and `student_subject`. Here `student_subject` is a pivot table. This table will store data which student is taken which subjects. 4 | 5 | 6 | 7 | You will find all of database related code in [this package](https://github.com/hasancse91/Android-SQLite-Tutorial/tree/master/03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/database). 8 | Thare are some interfaces and their implementations. I tried to separate database related code from Activity. -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/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 | android.enableJetifier=true 13 | android.useAndroidX=true 14 | org.gradle.jvmargs=-Xmx1536m 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/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 | android.enableJetifier=true 13 | android.useAndroidX=true 14 | org.gradle.jvmargs=-Xmx1536m 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/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 | android.enableJetifier=true 13 | android.useAndroidX=true 14 | org.gradle.jvmargs=-Xmx1536m 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Util/Config.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Util; 2 | 3 | public class Config { 4 | 5 | public static final String DATABASE_NAME = "student-db"; 6 | 7 | //column names of student table 8 | public static final String TABLE_STUDENT = "student"; 9 | public static final String COLUMN_STUDENT_ID = "_id"; 10 | public static final String COLUMN_STUDENT_NAME = "name"; 11 | public static final String COLUMN_STUDENT_REGISTRATION = "registration_no"; 12 | public static final String COLUMN_STUDENT_PHONE = "phone"; 13 | public static final String COLUMN_STUDENT_EMAIL = "email"; 14 | 15 | //others for general purpose key-value pair data 16 | public static final String TITLE = "title"; 17 | public static final String CREATE_STUDENT = "create_student"; 18 | public static final String UPDATE_STUDENT = "update_student"; 19 | } 20 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/androidTest/java/com/hellohasan/sqlite_project/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project; 2 | 3 | import android.content.Context; 4 | import androidx.test.platform.app.InstrumentationRegistry; 5 | import androidx.test.ext.junit.runners.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.hellohasan.sqlite_project", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/androidTest/java/com/hellohasan/sqlite_project/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project; 2 | 3 | import android.content.Context; 4 | import androidx.test.platform.app.InstrumentationRegistry; 5 | import androidx.test.ext.junit.runners.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.hellohasan.sqlite_project", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/androidTest/java/com/hellohasan/sqlite_multiple_three_tables_crud/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud; 2 | 3 | import android.content.Context; 4 | import androidx.test.platform.app.InstrumentationRegistry; 5 | import androidx.test.ext.junit.runners.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.hellohasan.sqlite_multiple_three_tables_crud", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/hasan/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/hasan/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android SQLite Tutorial 2 | 3 | We'll develop these types of sample Android App using `SQLite` database. There are multiple sample project in this repository. Check below list: 4 | 5 | ### 1. [Single table CRUD Operation](https://github.com/hasancse91/Android-SQLite-Tutorial/tree/master/01.SQLite-Single-Table-CRUD) 6 | 7 | 8 | ### 2. [Multiple (two) tables CRUD Operation](https://github.com/hasancse91/Android-SQLite-Tutorial/tree/master/02.SQLite-Multiple-(Two)-Tables-CRUD) 9 | 10 | 11 | ### 3. [Multiple (three) tables CRUD Operation](https://github.com/hasancse91/Android-SQLite-Tutorial/tree/master/03.SQLite-Multiple-(Three)-Tables-CRUD) 12 | 13 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SQLite-Single-Table-CRUD 3 | Settings 4 | 5 | 6 | Hello blank fragment 7 | CreateSubjectActivity 8 | Registration No 9 | Email 10 | Phone 11 | Delete student from SQLite database 12 | Student List is Empty! 13 | Student Name 14 | Update 15 | Cancel 16 | Create 17 | All Delete 18 | Edit Single student information 19 | 20 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/features/taken_subject_crud/subject_assign/SubjectAssignViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.features.taken_subject_crud.subject_assign; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.CheckBox; 6 | import android.widget.TextView; 7 | 8 | import com.hellohasan.sqlite_multiple_three_tables_crud.R; 9 | 10 | public class SubjectAssignViewHolder extends RecyclerView.ViewHolder { 11 | 12 | CheckBox checkBox; 13 | TextView subjectNameTextView; 14 | TextView courseCodeTextView; 15 | TextView creditTextView; 16 | 17 | public SubjectAssignViewHolder(View itemView) { 18 | super(itemView); 19 | checkBox = itemView.findViewById(R.id.checkbox); 20 | subjectNameTextView = itemView.findViewById(R.id.subjectNameTextView); 21 | courseCodeTextView = itemView.findViewById(R.id.courseCodeTextView); 22 | creditTextView = itemView.findViewById(R.id.creditTextView); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/features/taken_subject_crud/taken_subject_show/TakenSubjectViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.features.taken_subject_crud.taken_subject_show; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.ImageView; 6 | import android.widget.TextView; 7 | 8 | import com.hellohasan.sqlite_multiple_three_tables_crud.R; 9 | 10 | class TakenSubjectViewHolder extends RecyclerView.ViewHolder { 11 | 12 | TextView subjectNameTextView; 13 | TextView courseCodeTextView; 14 | TextView creditTextView; 15 | ImageView deleteIcon; 16 | 17 | public TakenSubjectViewHolder(View itemView) { 18 | super(itemView); 19 | 20 | subjectNameTextView = itemView.findViewById(R.id.subjectNameTextView); 21 | courseCodeTextView = itemView.findViewById(R.id.courseCodeTextView); 22 | creditTextView = itemView.findViewById(R.id.creditTextView); 23 | deleteIcon = itemView.findViewById(R.id.deleteIcon); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/model/Subject.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.model; 2 | 3 | public class Subject { 4 | private int id; 5 | private String name; 6 | private int code; 7 | private double credit; 8 | 9 | public Subject(int id, String name, int code, double credit) { 10 | this.id = id; 11 | this.name = name; 12 | this.code = code; 13 | this.credit = credit; 14 | } 15 | 16 | public int getId() { 17 | return id; 18 | } 19 | 20 | public void setId(int id) { 21 | this.id = id; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public void setName(String name) { 29 | this.name = name; 30 | } 31 | 32 | public int getCode() { 33 | return code; 34 | } 35 | 36 | public void setCode(int code) { 37 | this.code = code; 38 | } 39 | 40 | public double getCredit() { 41 | return credit; 42 | } 43 | 44 | public void setCredit(double credit) { 45 | this.credit = credit; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/features/subject_crud/subject_list_show/SubjectViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.features.subject_crud.subject_list_show; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.ImageView; 6 | import android.widget.TextView; 7 | 8 | import com.hellohasan.sqlite_multiple_three_tables_crud.R; 9 | 10 | public class SubjectViewHolder extends RecyclerView.ViewHolder { 11 | 12 | TextView subjectNameTextView; 13 | TextView courseCodeTextView; 14 | TextView creditTextView; 15 | ImageView editIcon; 16 | ImageView deleteIcon; 17 | 18 | public SubjectViewHolder(View itemView) { 19 | super(itemView); 20 | 21 | subjectNameTextView = itemView.findViewById(R.id.subjectNameTextView); 22 | courseCodeTextView = itemView.findViewById(R.id.courseCodeTextView); 23 | creditTextView = itemView.findViewById(R.id.creditTextView); 24 | editIcon = itemView.findViewById(R.id.editIcon); 25 | deleteIcon = itemView.findViewById(R.id.deleteIcon); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/SubjectCRUD/CreateSubject/Subject.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.SubjectCRUD.CreateSubject; 2 | 3 | public class Subject { 4 | private long id; 5 | private String name; 6 | private int code; 7 | private double credit; 8 | 9 | public Subject(long id, String name, int code, double credit) { 10 | this.id = id; 11 | this.name = name; 12 | this.code = code; 13 | this.credit = credit; 14 | } 15 | 16 | public long getId() { 17 | return id; 18 | } 19 | 20 | public void setId(long id) { 21 | this.id = id; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public void setName(String name) { 29 | this.name = name; 30 | } 31 | 32 | public int getCode() { 33 | return code; 34 | } 35 | 36 | public void setCode(int code) { 37 | this.code = code; 38 | } 39 | 40 | public double getCredit() { 41 | return credit; 42 | } 43 | 44 | public void setCredit(double credit) { 45 | this.credit = credit; 46 | } 47 | } -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/SubjectCRUD/ShowSubjectList/CustomViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.SubjectCRUD.ShowSubjectList; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.ImageView; 6 | import android.widget.TextView; 7 | 8 | import com.hellohasan.sqlite_project.R; 9 | 10 | public class CustomViewHolder extends RecyclerView.ViewHolder { 11 | 12 | TextView subjectNameTextView; 13 | TextView subjectCodeTextView; 14 | TextView subjectCreditTextView; 15 | ImageView crossButtonImageView; 16 | ImageView editButtonImageView; 17 | 18 | public CustomViewHolder(View itemView) { 19 | super(itemView); 20 | 21 | subjectNameTextView = itemView.findViewById(R.id.subjectNameTextView); 22 | subjectCodeTextView = itemView.findViewById(R.id.subjectCodeTextView); 23 | subjectCreditTextView = itemView.findViewById(R.id.subjectCreditTextView); 24 | crossButtonImageView = itemView.findViewById(R.id.crossImageView); 25 | editButtonImageView = itemView.findViewById(R.id.editImageView); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/ShowStudentList/CustomViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.ShowStudentList; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.ImageView; 6 | import android.widget.TextView; 7 | 8 | import com.hellohasan.sqlite_project.R; 9 | 10 | public class CustomViewHolder extends RecyclerView.ViewHolder { 11 | 12 | TextView nameTextView; 13 | TextView registrationNumTextView; 14 | TextView emailTextView; 15 | TextView phoneTextView; 16 | ImageView crossButtonImageView; 17 | ImageView editButtonImageView; 18 | 19 | public CustomViewHolder(View itemView) { 20 | super(itemView); 21 | 22 | nameTextView = itemView.findViewById(R.id.nameTextView); 23 | registrationNumTextView = itemView.findViewById(R.id.registrationNumTextView); 24 | emailTextView = itemView.findViewById(R.id.emailTextView); 25 | phoneTextView = itemView.findViewById(R.id.phoneTextView); 26 | crossButtonImageView = itemView.findViewById(R.id.crossImageView); 27 | editButtonImageView = itemView.findViewById(R.id.editImageView); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/StudentCRUD/ShowStudentList/CustomViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.StudentCRUD.ShowStudentList; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.ImageView; 6 | import android.widget.TextView; 7 | 8 | import com.hellohasan.sqlite_project.R; 9 | 10 | public class CustomViewHolder extends RecyclerView.ViewHolder { 11 | 12 | TextView nameTextView; 13 | TextView registrationNumTextView; 14 | TextView emailTextView; 15 | TextView phoneTextView; 16 | ImageView crossButtonImageView; 17 | ImageView editButtonImageView; 18 | 19 | public CustomViewHolder(View itemView) { 20 | super(itemView); 21 | 22 | nameTextView = itemView.findViewById(R.id.nameTextView); 23 | registrationNumTextView = itemView.findViewById(R.id.registrationNumTextView); 24 | emailTextView = itemView.findViewById(R.id.emailTextView); 25 | phoneTextView = itemView.findViewById(R.id.phoneTextView); 26 | crossButtonImageView = itemView.findViewById(R.id.crossImageView); 27 | editButtonImageView = itemView.findViewById(R.id.editImageView); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/features/student_crud/student_list_show/StudentViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.features.student_crud.student_list_show; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.ImageView; 6 | import android.widget.TextView; 7 | 8 | import com.hellohasan.sqlite_multiple_three_tables_crud.R; 9 | 10 | class StudentViewHolder extends RecyclerView.ViewHolder { 11 | 12 | TextView nameTextView; 13 | TextView registrationNumTextView; 14 | TextView emailTextView; 15 | TextView phoneTextView; 16 | ImageView editImageView; 17 | ImageView deleteImageView; 18 | 19 | StudentViewHolder(View itemView) { 20 | super(itemView); 21 | nameTextView = itemView.findViewById(R.id.nameTextView); 22 | registrationNumTextView = itemView.findViewById(R.id.registrationNumTextView); 23 | emailTextView = itemView.findViewById(R.id.emailTextView); 24 | phoneTextView = itemView.findViewById(R.id.phoneTextView); 25 | editImageView = itemView.findViewById(R.id.editImageView); 26 | deleteImageView = itemView.findViewById(R.id.deleteImageView); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.hellohasan.sqlite_multiple_three_tables_crud" 7 | minSdkVersion 19 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | vectorDrawables.useSupportLibrary = true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(dir: 'libs', include: ['*.jar']) 24 | implementation 'androidx.appcompat:appcompat:1.1.0' 25 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 26 | implementation 'com.google.android.material:material:1.0.0' 27 | implementation 'androidx.cardview:cardview:1.0.0' 28 | implementation 'androidx.recyclerview:recyclerview:1.0.0' 29 | testImplementation 'junit:junit:4.12' 30 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 31 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 32 | implementation 'com.orhanobut:logger:2.2.0' 33 | } 34 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.hellohasan.sqlite_project" 7 | minSdkVersion 15 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(dir: 'libs', include: ['*.jar']) 23 | androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { 24 | exclude group: 'com.android.support', module: 'support-annotations' 25 | }) 26 | implementation 'androidx.appcompat:appcompat:1.1.0' 27 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 28 | implementation 'com.google.android.material:material:1.0.0' 29 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 30 | implementation 'com.orhanobut:logger:2.2.0' 31 | implementation 'androidx.cardview:cardview:1.0.0' 32 | implementation 'androidx.recyclerview:recyclerview:1.0.0' 33 | testImplementation 'junit:junit:4.12' 34 | } 35 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.hellohasan.sqlite_project" 7 | minSdkVersion 19 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | vectorDrawables.useSupportLibrary = true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | implementation 'androidx.appcompat:appcompat:1.1.0' 28 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 29 | implementation 'com.google.android.material:material:1.0.0' 30 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 31 | implementation 'com.orhanobut:logger:2.2.0' 32 | implementation 'androidx.cardview:cardview:1.0.0' 33 | implementation 'androidx.recyclerview:recyclerview:1.0.0' 34 | testImplementation 'junit:junit:4.12' 35 | } 36 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/database/TableRowCountQueryImplementation.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.database; 2 | 3 | import android.database.DatabaseUtils; 4 | import android.database.sqlite.SQLiteDatabase; 5 | 6 | import com.hellohasan.sqlite_multiple_three_tables_crud.model.TableRowCount; 7 | 8 | import static com.hellohasan.sqlite_multiple_three_tables_crud.util.Constants.*; 9 | 10 | public class TableRowCountQueryImplementation implements QueryContract.TableRowCountQuery { 11 | 12 | @Override 13 | public void getTableRowCount(QueryResponse response) { 14 | DatabaseHelper databaseHelper = DatabaseHelper.getInstance(); 15 | SQLiteDatabase sqLiteDatabase = databaseHelper.getReadableDatabase(); 16 | 17 | try { 18 | long studentCount = DatabaseUtils.queryNumEntries(sqLiteDatabase, TABLE_STUDENT); 19 | long subjectCount = DatabaseUtils.queryNumEntries(sqLiteDatabase, TABLE_SUBJECT); 20 | long takenSubjectCount = DatabaseUtils.queryNumEntries(sqLiteDatabase, TABLE_STUDENT_SUBJECT); 21 | 22 | TableRowCount tableRowCount = new TableRowCount(studentCount, subjectCount, takenSubjectCount); 23 | response.onSuccess(tableRowCount); 24 | 25 | } catch (Exception e){ 26 | response.onFailure(e.getMessage()); 27 | } finally { 28 | sqLiteDatabase.close(); 29 | } 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/model/Student.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.model; 2 | 3 | public class Student { 4 | private int id; 5 | private String name; 6 | private long registrationNumber; 7 | private String phone; 8 | private String email; 9 | 10 | public Student(int id, String name, long registrationNumber, String phone, String email) { 11 | this.id = id; 12 | this.name = name; 13 | this.registrationNumber = registrationNumber; 14 | this.phone = phone; 15 | this.email = email; 16 | } 17 | 18 | public int getId() { 19 | return id; 20 | } 21 | 22 | public void setId(int id) { 23 | this.id = id; 24 | } 25 | 26 | public String getName() { 27 | return name; 28 | } 29 | 30 | public void setName(String name) { 31 | this.name = name; 32 | } 33 | 34 | public long getRegistrationNumber() { 35 | return registrationNumber; 36 | } 37 | 38 | public void setRegistrationNumber(long registrationNumber) { 39 | this.registrationNumber = registrationNumber; 40 | } 41 | 42 | public String getPhone() { 43 | return phone; 44 | } 45 | 46 | public void setPhone(String phone) { 47 | this.phone = phone; 48 | } 49 | 50 | public String getEmail() { 51 | return email; 52 | } 53 | 54 | public void setEmail(String email) { 55 | this.email = email; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/layout/layout_table_row_count.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 25 | 26 | 33 | 34 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/CreateStudent/Student.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.CreateStudent; 2 | 3 | public class Student { 4 | private long id; 5 | private String name; 6 | private long registrationNumber; 7 | private String phoneNumber; 8 | private String email; 9 | 10 | public Student(int id, String name, long registrationNumber, String phoneNumber, String email) { 11 | this.id = id; 12 | this.name = name; 13 | this.registrationNumber = registrationNumber; 14 | this.phoneNumber = phoneNumber; 15 | this.email = email; 16 | } 17 | 18 | public long getId() { 19 | return id; 20 | } 21 | 22 | public void setId(long id) { 23 | this.id = id; 24 | } 25 | 26 | public String getName() { 27 | return name; 28 | } 29 | 30 | public void setName(String name) { 31 | this.name = name; 32 | } 33 | 34 | public long getRegistrationNumber() { 35 | return registrationNumber; 36 | } 37 | 38 | public void setRegistrationNumber(long registrationNumber) { 39 | this.registrationNumber = registrationNumber; 40 | } 41 | 42 | public String getPhoneNumber() { 43 | return phoneNumber; 44 | } 45 | 46 | public void setPhoneNumber(String phoneNumber) { 47 | this.phoneNumber = phoneNumber; 48 | } 49 | 50 | public String getEmail() { 51 | return email; 52 | } 53 | 54 | public void setEmail(String email) { 55 | this.email = email; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Features/StudentCRUD/CreateStudent/Student.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Features.StudentCRUD.CreateStudent; 2 | 3 | public class Student { 4 | private long id; 5 | private String name; 6 | private long registrationNumber; 7 | private String phoneNumber; 8 | private String email; 9 | 10 | public Student(int id, String name, long registrationNumber, String phoneNumber, String email) { 11 | this.id = id; 12 | this.name = name; 13 | this.registrationNumber = registrationNumber; 14 | this.phoneNumber = phoneNumber; 15 | this.email = email; 16 | } 17 | 18 | public long getId() { 19 | return id; 20 | } 21 | 22 | public void setId(long id) { 23 | this.id = id; 24 | } 25 | 26 | public String getName() { 27 | return name; 28 | } 29 | 30 | public void setName(String name) { 31 | this.name = name; 32 | } 33 | 34 | public long getRegistrationNumber() { 35 | return registrationNumber; 36 | } 37 | 38 | public void setRegistrationNumber(long registrationNumber) { 39 | this.registrationNumber = registrationNumber; 40 | } 41 | 42 | public String getPhoneNumber() { 43 | return phoneNumber; 44 | } 45 | 46 | public void setPhoneNumber(String phoneNumber) { 47 | this.phoneNumber = phoneNumber; 48 | } 49 | 50 | public String getEmail() { 51 | return email; 52 | } 53 | 54 | public void setEmail(String email) { 55 | this.email = email; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/layout/activity_student_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /01.SQLite-Single-Table-CRUD/app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 21 | 22 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/layout/activity_subject_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_project/Util/Config.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_project.Util; 2 | 3 | public class Config { 4 | 5 | public static final String DATABASE_NAME = "student-db"; 6 | 7 | //column names of student table 8 | public static final String TABLE_STUDENT = "student"; 9 | public static final String COLUMN_STUDENT_ID = "_id"; 10 | public static final String COLUMN_STUDENT_NAME = "name"; 11 | public static final String COLUMN_STUDENT_REGISTRATION = "registration_no"; 12 | public static final String COLUMN_STUDENT_PHONE = "phone"; 13 | public static final String COLUMN_STUDENT_EMAIL = "email"; 14 | 15 | //column names of subject table 16 | public static final String TABLE_SUBJECT = "subject"; 17 | public static final String COLUMN_SUBJECT_ID = "_id"; 18 | public static final String COLUMN_REGISTRATION_NUMBER = "fk_registration_no"; 19 | public static final String COLUMN_SUBJECT_NAME = "name"; 20 | public static final String COLUMN_SUBJECT_CODE = "subject_code"; 21 | public static final String COLUMN_SUBJECT_CREDIT = "credit"; 22 | public static final String STUDENT_SUB_CONSTRAINT = "student_sub_unique"; 23 | 24 | //others for general purpose key-value pair data 25 | public static final String TITLE = "title"; 26 | public static final String CREATE_STUDENT = "create_student"; 27 | public static final String UPDATE_STUDENT = "update_student"; 28 | public static final String CREATE_SUBJECT = "create_subject"; 29 | public static final String UPDATE_SUBJECT = "update_subject"; 30 | public static final String STUDENT_REGISTRATION = "student_registration"; 31 | } 32 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/java/com/hellohasan/sqlite_multiple_three_tables_crud/util/Constants.java: -------------------------------------------------------------------------------- 1 | package com.hellohasan.sqlite_multiple_three_tables_crud.util; 2 | 3 | public class Constants { 4 | 5 | //column names of student table 6 | public static final String TABLE_STUDENT = "student"; 7 | public static final String STUDENT_ID = "_id"; 8 | public static final String STUDENT_NAME = "name"; 9 | public static final String STUDENT_REGISTRATION_NUM = "registration_no"; 10 | public static final String STUDENT_PHONE = "phone"; 11 | public static final String STUDENT_EMAIL = "email"; 12 | 13 | //column names of subject table 14 | public static final String TABLE_SUBJECT = "subject"; 15 | public static final String SUBJECT_ID = "_id"; 16 | public static final String SUBJECT_NAME = "name"; 17 | public static final String SUBJECT_CODE = "code"; 18 | public static final String SUBJECT_CREDIT = "credit"; 19 | 20 | //column names of student_subject pivot table 21 | public static final String TABLE_STUDENT_SUBJECT = "student_subject"; 22 | public static final String STUDENT_ID_FK = "student_id"; 23 | public static final String SUBJECT_ID_FK = "subject_id"; 24 | public static final String STUDENT_SUB_CONSTRAINT = "student_sub_unique"; 25 | 26 | //others for general purpose key-value pair data 27 | public static final String TITLE = "title"; 28 | public static final String CREATE_STUDENT = "create_student"; 29 | public static final String UPDATE_STUDENT = "update_student"; 30 | public static final String CREATE_SUBJECT = "create_subject"; 31 | public static final String UPDATE_SUBJECT = "update_subject"; 32 | } -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/layout/activity_student_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/layout/activity_subject_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/layout/activity_student_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /02.SQLite-Multiple-(Two)-Tables-CRUD/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SQLite-Multiple-Tables-CRUD 3 | Settings 4 | CreateSubjectActivity 5 | Registration No 6 | Email 7 | Phone 8 | Delete student from SQLite database 9 | List is Empty! 10 | Student Name 11 | Update 12 | Cancel 13 | Create 14 | All Delete 15 | Edit Single student information 16 | Subject Name 17 | Subject Code 18 | Subject Credit 19 | Add New Subject 20 | Student Information 21 | Name 22 | Registration Number: 23 | Subject List 24 | Student List 25 | Total Student: %1$d. Total Subject: %2$d 26 | 27 | 28 | Hello blank fragment 29 | Update 30 | 31 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 29 | 33 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /03.SQLite-Multiple-(Three)-Tables-CRUD/app/src/main/res/layout/activity_subject_assign.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 20 | 21 | 30 | 31 |