├── README.md
├── fundamentals
├── modeldemo
│ ├── .gitignore
│ ├── .idea
│ │ ├── codeStyles
│ │ │ ├── Project.xml
│ │ │ └── codeStyleConfig.xml
│ │ ├── gradle.xml
│ │ ├── misc.xml
│ │ ├── runConfigurations.xml
│ │ └── vcs.xml
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── leventarican
│ │ │ │ └── modeldemo
│ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── github
│ │ │ │ │ └── leventarican
│ │ │ │ │ └── modeldemo
│ │ │ │ │ ├── InternetService.kt
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ ├── repository
│ │ │ │ │ └── MainRepository.kt
│ │ │ │ │ └── screens
│ │ │ │ │ ├── MainFragment.kt
│ │ │ │ │ └── MainViewModel.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── fragment_main.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.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
│ │ │ │ ├── navigation
│ │ │ │ └── navigation.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── leventarican
│ │ │ └── modeldemo
│ │ │ └── ExampleUnitTest.kt
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── refresh
│ ├── .gitignore
│ ├── .idea
│ │ ├── codeStyles
│ │ │ ├── Project.xml
│ │ │ └── codeStyleConfig.xml
│ │ ├── gradle.xml
│ │ ├── misc.xml
│ │ ├── render.experimental.xml
│ │ ├── runConfigurations.xml
│ │ └── vcs.xml
│ ├── README.md
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── leventarican
│ │ │ │ └── refresh
│ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── ic_launcher-playstore.png
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── github
│ │ │ │ │ └── leventarican
│ │ │ │ │ └── refresh
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ ├── Page0.kt
│ │ │ │ │ ├── Page1.kt
│ │ │ │ │ ├── Page2.kt
│ │ │ │ │ ├── Page3.kt
│ │ │ │ │ ├── Page3ImageFragment.kt
│ │ │ │ │ ├── Page3JavaFragment.kt
│ │ │ │ │ ├── Page3KotlinFragment.kt
│ │ │ │ │ ├── Page3TitleFragment.kt
│ │ │ │ │ ├── Page4.kt
│ │ │ │ │ ├── Page5.kt
│ │ │ │ │ ├── Page6.kt
│ │ │ │ │ ├── Page7.kt
│ │ │ │ │ ├── etc
│ │ │ │ │ └── TimerLifecycle.kt
│ │ │ │ │ └── model
│ │ │ │ │ └── ProgrammingLanguage.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ ├── dice_1.xml
│ │ │ │ ├── dice_2.xml
│ │ │ │ ├── dice_3.xml
│ │ │ │ ├── dice_4.xml
│ │ │ │ ├── dice_5.xml
│ │ │ │ ├── dice_6.xml
│ │ │ │ ├── empty_dice.xml
│ │ │ │ ├── ic_computer_black_24dp.xml
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── font
│ │ │ │ └── roboto.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── activity_page0.xml
│ │ │ │ ├── activity_page1.xml
│ │ │ │ ├── activity_page2.xml
│ │ │ │ ├── activity_page3.xml
│ │ │ │ ├── activity_page4.xml
│ │ │ │ ├── activity_page5.xml
│ │ │ │ ├── activity_page6.xml
│ │ │ │ ├── activity_page7.xml
│ │ │ │ ├── fragment_page3_image.xml
│ │ │ │ ├── fragment_page3_java.xml
│ │ │ │ ├── fragment_page3_kotlin.xml
│ │ │ │ └── fragment_page3_title.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.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
│ │ │ │ ├── navigation
│ │ │ │ └── navigation.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── font_certs.xml
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── preloaded_fonts.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── leventarican
│ │ │ └── refresh
│ │ │ └── ExampleUnitTest.kt
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
└── template
│ ├── .gitignore
│ ├── .idea
│ ├── codeStyles
│ │ ├── Project.xml
│ │ └── codeStyleConfig.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── runConfigurations.xml
│ └── vcs.xml
│ ├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── leventarican
│ │ │ └── template
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── leventarican
│ │ │ │ └── template
│ │ │ │ ├── FirstFragment.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ └── SecondFragment.kt
│ │ └── res
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ ├── content_main.xml
│ │ │ ├── fragment_first.xml
│ │ │ └── fragment_second.xml
│ │ │ ├── menu
│ │ │ └── menu_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.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
│ │ │ ├── navigation
│ │ │ └── nav_graph.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── github
│ │ └── leventarican
│ │ └── template
│ │ └── ExampleUnitTest.kt
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── helloworld
├── .gitignore
├── .idea
│ ├── codeStyles
│ │ ├── Project.xml
│ │ └── codeStyleConfig.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── runConfigurations.xml
│ └── vcs.xml
├── automotive
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── leventarican
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── ic_launcher-playstore.png
│ │ └── res
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── github
│ │ └── leventarican
│ │ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── mobile
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── leventarican
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── leventarican
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.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
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── github
│ │ └── leventarican
│ │ └── ExampleUnitTest.kt
├── music.png
├── settings.gradle
└── shared
│ ├── build.gradle
│ ├── build
│ ├── .transforms
│ │ ├── 14d2211a97b9d30b32a582250d7fb39e.bin
│ │ └── 14d2211a97b9d30b32a582250d7fb39e
│ │ │ └── classes
│ │ │ └── classes.dex
│ ├── generated
│ │ └── source
│ │ │ └── buildConfig
│ │ │ └── debug
│ │ │ └── com
│ │ │ └── github
│ │ │ └── leventarican
│ │ │ └── shared
│ │ │ └── BuildConfig.java
│ ├── intermediates
│ │ ├── aapt_friendly_merged_manifests
│ │ │ └── debug
│ │ │ │ └── aapt
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── output.json
│ │ ├── annotation_processor_list
│ │ │ └── debug
│ │ │ │ └── annotationProcessors.json
│ │ ├── compile_library_classes
│ │ │ └── debug
│ │ │ │ └── classes.jar
│ │ ├── compile_only_not_namespaced_r_class_jar
│ │ │ └── debug
│ │ │ │ └── R.jar
│ │ ├── compile_symbol_list
│ │ │ └── debug
│ │ │ │ └── R.txt
│ │ ├── compiled_local_resources
│ │ │ └── debug
│ │ │ │ └── out
│ │ │ │ └── xml_automotive_app_desc.xml.flat
│ │ ├── incremental
│ │ │ ├── debug-mergeNativeLibs
│ │ │ │ └── merge-state
│ │ │ ├── mergeDebugJniLibFolders
│ │ │ │ └── merger.xml
│ │ │ ├── mergeDebugShaders
│ │ │ │ └── merger.xml
│ │ │ ├── packageDebugAssets
│ │ │ │ └── merger.xml
│ │ │ └── packageDebugResources
│ │ │ │ ├── compile-file-map.properties
│ │ │ │ └── merger.xml
│ │ ├── javac
│ │ │ └── debug
│ │ │ │ └── classes
│ │ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── leventarican
│ │ │ │ └── shared
│ │ │ │ └── BuildConfig.class
│ │ ├── library_java_res
│ │ │ └── debug
│ │ │ │ └── res.jar
│ │ ├── library_manifest
│ │ │ └── debug
│ │ │ │ └── AndroidManifest.xml
│ │ ├── local_only_symbol_list
│ │ │ └── debug
│ │ │ │ └── R-def.txt
│ │ ├── manifest_merge_blame_file
│ │ │ └── debug
│ │ │ │ └── manifest-merger-blame-debug-report.txt
│ │ ├── merged_manifests
│ │ │ └── debug
│ │ │ │ └── output.json
│ │ ├── navigation_json
│ │ │ └── debug
│ │ │ │ └── navigation.json
│ │ ├── packaged_res
│ │ │ └── debug
│ │ │ │ └── xml
│ │ │ │ └── automotive_app_desc.xml
│ │ ├── runtime_library_classes
│ │ │ └── debug
│ │ │ │ └── classes.jar
│ │ └── symbol_list_with_package_name
│ │ │ └── debug
│ │ │ └── package-aware-r.txt
│ ├── kotlin
│ │ └── compileDebugKotlin
│ │ │ ├── build-history.bin
│ │ │ ├── caches-jvm
│ │ │ ├── inputs
│ │ │ │ ├── source-to-output.tab
│ │ │ │ ├── source-to-output.tab.keystream
│ │ │ │ ├── source-to-output.tab.keystream.len
│ │ │ │ ├── source-to-output.tab.len
│ │ │ │ ├── source-to-output.tab.values.at
│ │ │ │ ├── source-to-output.tab_i
│ │ │ │ └── source-to-output.tab_i.len
│ │ │ ├── jvm
│ │ │ │ └── kotlin
│ │ │ │ │ ├── class-fq-name-to-source.tab
│ │ │ │ │ ├── class-fq-name-to-source.tab.keystream
│ │ │ │ │ ├── class-fq-name-to-source.tab.keystream.len
│ │ │ │ │ ├── class-fq-name-to-source.tab.len
│ │ │ │ │ ├── class-fq-name-to-source.tab.values.at
│ │ │ │ │ ├── class-fq-name-to-source.tab_i
│ │ │ │ │ ├── class-fq-name-to-source.tab_i.len
│ │ │ │ │ ├── internal-name-to-source.tab
│ │ │ │ │ ├── internal-name-to-source.tab.keystream
│ │ │ │ │ ├── internal-name-to-source.tab.keystream.len
│ │ │ │ │ ├── internal-name-to-source.tab.len
│ │ │ │ │ ├── internal-name-to-source.tab.values.at
│ │ │ │ │ ├── internal-name-to-source.tab_i
│ │ │ │ │ ├── internal-name-to-source.tab_i.len
│ │ │ │ │ ├── proto.tab
│ │ │ │ │ ├── proto.tab.keystream
│ │ │ │ │ ├── proto.tab.keystream.len
│ │ │ │ │ ├── proto.tab.len
│ │ │ │ │ ├── proto.tab.values.at
│ │ │ │ │ ├── proto.tab_i
│ │ │ │ │ ├── proto.tab_i.len
│ │ │ │ │ ├── source-to-classes.tab
│ │ │ │ │ ├── source-to-classes.tab.keystream
│ │ │ │ │ ├── source-to-classes.tab.keystream.len
│ │ │ │ │ ├── source-to-classes.tab.len
│ │ │ │ │ ├── source-to-classes.tab.values.at
│ │ │ │ │ ├── source-to-classes.tab_i
│ │ │ │ │ ├── source-to-classes.tab_i.len
│ │ │ │ │ ├── subtypes.tab
│ │ │ │ │ ├── subtypes.tab.keystream
│ │ │ │ │ ├── subtypes.tab.keystream.len
│ │ │ │ │ ├── subtypes.tab.len
│ │ │ │ │ ├── subtypes.tab.values.at
│ │ │ │ │ ├── subtypes.tab_i
│ │ │ │ │ ├── subtypes.tab_i.len
│ │ │ │ │ ├── supertypes.tab
│ │ │ │ │ ├── supertypes.tab.keystream
│ │ │ │ │ ├── supertypes.tab.keystream.len
│ │ │ │ │ ├── supertypes.tab.len
│ │ │ │ │ ├── supertypes.tab.values.at
│ │ │ │ │ ├── supertypes.tab_i
│ │ │ │ │ └── supertypes.tab_i.len
│ │ │ └── lookups
│ │ │ │ ├── counters.tab
│ │ │ │ ├── file-to-id.tab
│ │ │ │ ├── file-to-id.tab.keystream
│ │ │ │ ├── file-to-id.tab.keystream.len
│ │ │ │ ├── file-to-id.tab.len
│ │ │ │ ├── file-to-id.tab.values.at
│ │ │ │ ├── file-to-id.tab_i
│ │ │ │ ├── file-to-id.tab_i.len
│ │ │ │ ├── id-to-file.tab
│ │ │ │ ├── id-to-file.tab.keystream
│ │ │ │ ├── id-to-file.tab.keystream.len
│ │ │ │ ├── id-to-file.tab.len
│ │ │ │ ├── id-to-file.tab.values.at
│ │ │ │ ├── lookups.tab
│ │ │ │ ├── lookups.tab.keystream
│ │ │ │ ├── lookups.tab.keystream.len
│ │ │ │ ├── lookups.tab.len
│ │ │ │ ├── lookups.tab.values.at
│ │ │ │ ├── lookups.tab_i
│ │ │ │ └── lookups.tab_i.len
│ │ │ └── last-build.bin
│ ├── outputs
│ │ └── logs
│ │ │ └── manifest-merger-debug-report.txt
│ └── tmp
│ │ └── kotlin-classes
│ │ └── debug
│ │ ├── META-INF
│ │ └── shared_debug.kotlin_module
│ │ └── com
│ │ └── github
│ │ └── leventarican
│ │ └── shared
│ │ ├── MyMusicService$callback$1.class
│ │ └── MyMusicService.class
│ └── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── github
│ │ └── leventarican
│ │ └── shared
│ │ └── MyMusicService.kt
│ └── res
│ └── xml
│ └── automotive_app_desc.xml
└── screenshot.png
/README.md:
--------------------------------------------------------------------------------
1 | # android-automotive os
2 | * android automotive is android
3 | * android auto vs android automotive OS
4 | * android auto launched in 2015
5 | * with android automotive OS will the vehicle run android natively without a phone
6 | * the strategy is to build on multible plattforms: phone, automotive. so one project for all.
7 |
8 | 
9 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
20 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 |
5 | android {
6 | compileSdkVersion 29
7 | buildToolsVersion "29.0.2"
8 |
9 | defaultConfig {
10 | applicationId "com.github.leventarican.modeldemo"
11 | minSdkVersion 19
12 | targetSdkVersion 29
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | dataBinding {
27 | enabled = true
28 | }
29 |
30 | }
31 |
32 | dependencies {
33 | implementation fileTree(dir: 'libs', include: ['*.jar'])
34 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
35 | implementation 'androidx.appcompat:appcompat:1.1.0'
36 | implementation 'androidx.core:core-ktx:1.2.0'
37 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
38 | testImplementation 'junit:junit:4.12'
39 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
40 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
41 |
42 | // Navigation
43 | implementation "android.arch.navigation:navigation-fragment-ktx:1.0.0"
44 | implementation "android.arch.navigation:navigation-ui-ktx:1.0.0"
45 |
46 | // ViewModel and LiveData
47 | implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
48 |
49 | // parse HTML
50 | implementation 'org.jsoup:jsoup:1.13.1'
51 | }
52 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/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 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/androidTest/java/com/github/leventarican/modeldemo/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.modeldemo
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.github.leventarican.modeldemo", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/java/com/github/leventarican/modeldemo/InternetService.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.modeldemo
2 |
3 | import android.os.AsyncTask
4 | import org.jsoup.Jsoup
5 | import org.jsoup.nodes.Document
6 |
7 |
8 | class InternetService {
9 |
10 | private val url = "https://example.com"
11 | private lateinit var times: MutableList
12 |
13 | fun connect(): InternetService {
14 | val doc = Connector().execute(url).get()
15 | val h1 = doc.select("h1")
16 | times = mutableListOf()
17 | h1.forEach {
18 | times.add(it.text())
19 | }
20 | return this
21 | }
22 |
23 | fun getTimes(): MutableList {
24 | return times
25 | }
26 | }
27 |
28 | /*
29 | * network call! we wont do that in main/ui thread.
30 | * Caused by: android.os.NetworkOnMainThreadException
31 | *
32 | * for https we need a certification
33 | * Caused by: java.security.cert.CertificateException
34 | */
35 | class Connector : AsyncTask() {
36 | override fun doInBackground(vararg params: String?): Document {
37 | return Jsoup.connect(params[0]).get()
38 | }
39 | }
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/java/com/github/leventarican/modeldemo/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.modeldemo
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 |
6 | class MainActivity : AppCompatActivity() {
7 |
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_main)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/java/com/github/leventarican/modeldemo/repository/MainRepository.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.modeldemo.repository
2 |
3 | class MainRepository {
4 | }
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/java/com/github/leventarican/modeldemo/screens/MainFragment.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.modeldemo.screens
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import androidx.databinding.DataBindingUtil
8 | import androidx.fragment.app.Fragment
9 | import androidx.lifecycle.ViewModelProviders
10 | import com.github.leventarican.modeldemo.R
11 | import com.github.leventarican.modeldemo.databinding.FragmentMainBinding
12 |
13 | class MainFragment : Fragment() {
14 |
15 | // for each layout exists a generated binding class
16 | private lateinit var binding: FragmentMainBinding
17 | private lateinit var viewModel: MainViewModel
18 |
19 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
20 |
21 | binding = DataBindingUtil.inflate(inflater, R.layout.fragment_main, container, false)
22 | // ViewModelProviders will be deprecated in lifecycle 2.2.0: use ViewModelProvider
23 | viewModel = ViewModelProviders.of(this).get(MainViewModel::class.java)
24 | binding.mainViewModel = viewModel
25 | binding.lifecycleOwner = viewLifecycleOwner
26 |
27 | return binding.root
28 | }
29 | }
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/java/com/github/leventarican/modeldemo/screens/MainViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.modeldemo.screens
2 |
3 | import androidx.lifecycle.LiveData
4 | import androidx.lifecycle.MutableLiveData
5 | import androidx.lifecycle.Transformations
6 | import androidx.lifecycle.ViewModel
7 |
8 | class MainViewModel : ViewModel() {
9 | var debug = MutableLiveData()
10 | val number = MutableLiveData()
11 | private var numbers: MutableList
12 | val numberCustomized = Transformations.map(number) { _ -> "next num: ${number.value}" }
13 |
14 | init {
15 | debug.value = "init"
16 | numbers = mutableListOf(7, 10, 11, 80, 4, 3, 100)
17 | }
18 |
19 | fun next() {
20 | numbers.shuffle()
21 | number.value = numbers[0]
22 | }
23 | }
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/layout/fragment_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
19 |
20 |
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/navigation/navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
7 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | modeldemo
3 |
4 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/app/src/test/java/com/github/leventarican/modeldemo/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.modeldemo
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.3.71'
5 | repositories {
6 | google()
7 | jcenter()
8 |
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.6.2'
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 |
14 | // NOTE: Do not place your application dependencies here; they belong
15 | // in the individual module build.gradle files
16 | }
17 | }
18 |
19 | allprojects {
20 | repositories {
21 | google()
22 | jcenter()
23 |
24 | }
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
22 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/modeldemo/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/fundamentals/modeldemo/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Apr 13 22:36:28 CEST 2020
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.6.4-all.zip
7 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/fundamentals/modeldemo/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name='modeldemo'
2 | include ':app'
3 |
--------------------------------------------------------------------------------
/fundamentals/refresh/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 |
--------------------------------------------------------------------------------
/fundamentals/refresh/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/fundamentals/refresh/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/fundamentals/refresh/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/fundamentals/refresh/.idea/render.experimental.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/fundamentals/refresh/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/fundamentals/refresh/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/fundamentals/refresh/README.md:
--------------------------------------------------------------------------------
1 | # refresh android and kotlin
2 | * project based on _Empty Activity_
3 | * any `Activity` has to be declared in `AndroidManifest.xml`
4 | * `AndroidManifest.xml` you also define app permission: use internet, contact data, ...
5 | * gradle build system (a android project consist of modules)
6 | * `build.gradle(Project: ...)` common for all app modules: project-level
7 | * `build.gradle(Module: ...)` each module has its own gradle file: module level
8 | * an `Activity` draws the UI and receives input events
9 | * a layout file is _inflated_ into view objects in memory when the activity starts
10 | * some parts are based of: https://codelabs.developers.google.com/android-kotlin-fundamentals/
11 |
12 | ## troubleshooting
13 | * sometimes the design view does not represent the correct view. just run the app in order to see the real view.
14 | * data-binding: if you receive the following error `Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException`
15 | and use Java 11 then mind that `java.xml.bind` is no more supported in Java 11. or just use Java 8.
16 |
--------------------------------------------------------------------------------
/fundamentals/refresh/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/fundamentals/refresh/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 | apply plugin: 'androidx.navigation.safeargs'
5 |
6 | android {
7 | compileSdkVersion 29
8 | buildToolsVersion "29.0.2"
9 |
10 | defaultConfig {
11 | applicationId "com.github.leventarican.refresh"
12 | minSdkVersion 19
13 | targetSdkVersion 29
14 | versionCode 1
15 | versionName "1.0"
16 |
17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18 | }
19 |
20 | buildTypes {
21 | release {
22 | minifyEnabled false
23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 |
27 | // use DataBinding. e.g. good for view Layout file and Activity. instead of using findViewById
28 | dataBinding {
29 | enabled true
30 | }
31 | }
32 |
33 | // alternatively go to > project structure settings
34 | dependencies {
35 | implementation fileTree(dir: 'libs', include: ['*.jar'])
36 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
37 | implementation 'androidx.appcompat:appcompat:1.1.0'
38 | implementation 'androidx.core:core-ktx:1.1.0'
39 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
40 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
41 | testImplementation 'junit:junit:4.12'
42 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
43 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
44 |
45 | // this is needed for data-binding. Java 11 does not support jaxb anymore.
46 | implementation 'javax.xml.bind:jaxb-api:2.3.1'
47 |
48 | // add Navigation framework; see also project build.gradle where $navigationVersion is defined
49 | // then create navigation.xml file: right click res/ > New > Android Resource File > resource type Navigation
50 | implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
51 | implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
52 | }
53 |
--------------------------------------------------------------------------------
/fundamentals/refresh/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 |
--------------------------------------------------------------------------------
/fundamentals/refresh/app/src/androidTest/java/com/github/leventarican/refresh/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.refresh
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.github.leventarican.refresh", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/fundamentals/refresh/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/fundamentals/refresh/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leventarican/cookbook-android/d6a9526c59d54c8ba9e0874ff6183b1d13524ff9/fundamentals/refresh/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/fundamentals/refresh/app/src/main/java/com/github/leventarican/refresh/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.github.leventarican.refresh
2 |
3 | import android.content.Intent
4 | import android.os.Bundle
5 | import android.view.View
6 | import android.widget.Button
7 | import android.widget.ImageView
8 | import androidx.appcompat.app.AppCompatActivity
9 |
10 | /**
11 | * checkout the associated layout file: android_main.xml
12 | * we use AppCompatActivity instead of Activity because its supports modern Android features and
13 | * provides backward compatibility
14 | */
15 | class MainActivity : AppCompatActivity() {
16 |
17 | // onCreate is the minimum required method of the lifecycle callback methods (onCreate, onStart, ...)
18 | override fun onCreate(savedInstanceState: Bundle?) {
19 | super.onCreate(savedInstanceState)
20 | setContentView(R.layout.activity_main)
21 |
22 | findViewById