diff --git a/DBTApp/.gitignore b/DBTApp/.gitignore new file mode 100644 index 0000000..cecb4de --- /dev/null +++ b/DBTApp/.gitignore @@ -0,0 +1,188 @@ +# Android studio + +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties + +# Android + +# Created by https://www.toptal.com/developers/gitignore/api/android,androidstudio +# Edit at https://www.toptal.com/developers/gitignore?templates=android,androidstudio + +### Android ### +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Log/OS Files +*.log + +# Android Studio generated files and folders +captures/ +.externalNativeBuild/ +.cxx/ +*.apk +output.json + +# IntelliJ +*.iml +.idea/ +misc.xml +deploymentTargetDropDown.xml +render.experimental.xml + +# Keystore files +*.jks +*.keystore + +# Google Services (e.g. APIs or Firebase) +google-services.json + +# Android Profiling +*.hprof + +### Android Patch ### +gen-external-apklibs + +# Replacement of .externalNativeBuild directories introduced +# with Android Studio 3.5. + +### AndroidStudio ### +# Covers files to be ignored for android development using Android Studio. + +# Built application files +*.ap_ +*.aab + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ + +# Gradle files +.gradle + +# Signing files +.signing/ + +# Local configuration file (sdk path, etc) + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files + +# Android Studio +/*/build/ +/*/local.properties +/*/out +/*/*/build +/*/*/production +.navigation/ +*.ipr +*~ +*.swp + +# Keystore files + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Android Patch + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild + +# NDK +obj/ + +# IntelliJ IDEA +*.iws +/out/ + +# User-specific configurations +.idea/caches/ +.idea/libraries/ +.idea/shelf/ +.idea/workspace.xml +.idea/tasks.xml +.idea/.name +.idea/compiler.xml +.idea/copyright/profiles_settings.xml +.idea/encodings.xml +.idea/misc.xml +.idea/modules.xml +.idea/scopes/scope_settings.xml +.idea/dictionaries +.idea/vcs.xml +.idea/jsLibraryMappings.xml +.idea/datasources.xml +.idea/dataSources.ids +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml +.idea/assetWizardSettings.xml +.idea/gradle.xml +.idea/jarRepositories.xml +.idea/navEditor.xml + +# Legacy Eclipse project files +.classpath +.project +.cproject +.settings/ + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.war +*.ear + +# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) +hs_err_pid* + +## Plugin-specific files: + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Mongo Explorer plugin +.idea/mongoSettings.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +### AndroidStudio Patch ### + +!/gradle/wrapper/gradle-wrapper.jar + +# End of https://www.toptal.com/developers/gitignore/api/android,androidstudio + diff --git a/DBTApp/.idea/.gitignore b/DBTApp/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/DBTApp/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/DBTApp/.idea/.name b/DBTApp/.idea/.name new file mode 100644 index 0000000..8cb8797 --- /dev/null +++ b/DBTApp/.idea/.name @@ -0,0 +1 @@ +DBT App \ No newline at end of file diff --git a/DBTApp/.idea/AndroidProjectSystem.xml b/DBTApp/.idea/AndroidProjectSystem.xml new file mode 100644 index 0000000..4a53bee --- /dev/null +++ b/DBTApp/.idea/AndroidProjectSystem.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/codeStyles/Project.xml b/DBTApp/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..7643783 --- /dev/null +++ b/DBTApp/.idea/codeStyles/Project.xml @@ -0,0 +1,123 @@ + + + + + + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/codeStyles/codeStyleConfig.xml b/DBTApp/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/DBTApp/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/DBTApp/.idea/compiler.xml b/DBTApp/.idea/compiler.xml new file mode 100644 index 0000000..b86273d --- /dev/null +++ b/DBTApp/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/deploymentTargetSelector.xml b/DBTApp/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..812b017 --- /dev/null +++ b/DBTApp/.idea/deploymentTargetSelector.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/gradle.xml b/DBTApp/.idea/gradle.xml new file mode 100644 index 0000000..97f0a8e --- /dev/null +++ b/DBTApp/.idea/gradle.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/kotlinc.xml b/DBTApp/.idea/kotlinc.xml new file mode 100644 index 0000000..c224ad5 --- /dev/null +++ b/DBTApp/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/migrations.xml b/DBTApp/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/DBTApp/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/misc.xml b/DBTApp/.idea/misc.xml new file mode 100644 index 0000000..74dd639 --- /dev/null +++ b/DBTApp/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/runConfigurations.xml b/DBTApp/.idea/runConfigurations.xml new file mode 100644 index 0000000..16660f1 --- /dev/null +++ b/DBTApp/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/DBTApp/.idea/vcs.xml b/DBTApp/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/DBTApp/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/DBTApp/app/.gitignore b/DBTApp/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/DBTApp/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/DBTApp/app/build.gradle.kts b/DBTApp/app/build.gradle.kts new file mode 100644 index 0000000..e02b40e --- /dev/null +++ b/DBTApp/app/build.gradle.kts @@ -0,0 +1,52 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) +} + +android { + namespace = "de.cdaut.dbt" + compileSdk = 35 + + defaultConfig { + applicationId = "de.cdaut.dbt" + minSdk = 26 + targetSdk = 35 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + buildFeatures { + viewBinding = true + } +} + +dependencies { + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.constraintlayout) + implementation(libs.androidx.navigation.fragment.ktx) + implementation(libs.androidx.navigation.ui.ktx) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) +} \ No newline at end of file diff --git a/DBTApp/app/proguard-rules.pro b/DBTApp/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/DBTApp/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/DBTApp/app/src/androidTest/java/de/cdaut/dbt/ExampleInstrumentedTest.kt b/DBTApp/app/src/androidTest/java/de/cdaut/dbt/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..5242c37 --- /dev/null +++ b/DBTApp/app/src/androidTest/java/de/cdaut/dbt/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package de.cdaut.dbt + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("de.cdaut.dbt", appContext.packageName) + } +} \ No newline at end of file diff --git a/DBTApp/app/src/main/AndroidManifest.xml b/DBTApp/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..9e9a126 --- /dev/null +++ b/DBTApp/app/src/main/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DBTApp/app/src/main/java/de/cdaut/dbt/activities/FirstFragment.kt b/DBTApp/app/src/main/java/de/cdaut/dbt/activities/FirstFragment.kt new file mode 100644 index 0000000..e8c5b22 --- /dev/null +++ b/DBTApp/app/src/main/java/de/cdaut/dbt/activities/FirstFragment.kt @@ -0,0 +1,44 @@ +package de.cdaut.dbt.activities + +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.navigation.fragment.findNavController +import de.cdaut.dbt.R +import de.cdaut.dbt.databinding.FragmentFirstBinding + +/** + * A simple [Fragment] subclass as the default destination in the navigation. + */ +class FirstFragment : Fragment() { + +private var _binding: FragmentFirstBinding? = null + // This property is only valid between onCreateView and + // onDestroyView. + private val binding get() = _binding!! + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + + _binding = FragmentFirstBinding.inflate(inflater, container, false) + return binding.root + + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + binding.buttonFirst.setOnClickListener { + findNavController().navigate(R.id.action_FirstFragment_to_SecondFragment) + } + } + +override fun onDestroyView() { + super.onDestroyView() + _binding = null + } +} \ No newline at end of file diff --git a/DBTApp/app/src/main/java/de/cdaut/dbt/activities/HomeActivity.kt b/DBTApp/app/src/main/java/de/cdaut/dbt/activities/HomeActivity.kt new file mode 100644 index 0000000..d2b1f5a --- /dev/null +++ b/DBTApp/app/src/main/java/de/cdaut/dbt/activities/HomeActivity.kt @@ -0,0 +1,42 @@ +package de.cdaut.dbt.activities + +import android.os.Bundle +import com.google.android.material.snackbar.Snackbar +import androidx.appcompat.app.AppCompatActivity +import androidx.navigation.findNavController +import androidx.navigation.ui.AppBarConfiguration +import androidx.navigation.ui.navigateUp +import androidx.navigation.ui.setupActionBarWithNavController +import de.cdaut.dbt.R +import de.cdaut.dbt.databinding.ActivityHomeBinding + +class HomeActivity : AppCompatActivity() { + + private lateinit var appBarConfiguration: AppBarConfiguration + private lateinit var binding: ActivityHomeBinding + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + binding = ActivityHomeBinding.inflate(layoutInflater) + setContentView(binding.root) + + //setSupportActionBar(binding.toolbar) + + val navController = findNavController(R.id.nav_host_fragment_content_home) + appBarConfiguration = AppBarConfiguration(navController.graph) + setupActionBarWithNavController(navController, appBarConfiguration) + + binding.fab.setOnClickListener { view -> + Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) + .setAction("Action", null) + .setAnchorView(R.id.fab).show() + } + } + + override fun onSupportNavigateUp(): Boolean { + val navController = findNavController(R.id.nav_host_fragment_content_home) + return navController.navigateUp(appBarConfiguration) + || super.onSupportNavigateUp() + } +} \ No newline at end of file diff --git a/DBTApp/app/src/main/java/de/cdaut/dbt/activities/SecondFragment.kt b/DBTApp/app/src/main/java/de/cdaut/dbt/activities/SecondFragment.kt new file mode 100644 index 0000000..aaf7930 --- /dev/null +++ b/DBTApp/app/src/main/java/de/cdaut/dbt/activities/SecondFragment.kt @@ -0,0 +1,43 @@ +package de.cdaut.dbt.activities + +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.navigation.fragment.findNavController +import de.cdaut.dbt.R +import de.cdaut.dbt.databinding.FragmentSecondBinding + +/** + * A simple [Fragment] subclass as the second destination in the navigation. + */ +class SecondFragment : Fragment() { + +private var _binding: FragmentSecondBinding? = null + // This property is only valid between onCreateView and + // onDestroyView. + private val binding get() = _binding!! + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + + _binding = FragmentSecondBinding.inflate(inflater, container, false) + return binding.root + + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + binding.buttonSecond.setOnClickListener { + findNavController().navigate(R.id.action_SecondFragment_to_FirstFragment) + } + } +override fun onDestroyView() { + super.onDestroyView() + _binding = null + } +} \ No newline at end of file diff --git a/DBTApp/app/src/main/res/drawable/ic_launcher_background.xml b/DBTApp/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/DBTApp/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DBTApp/app/src/main/res/drawable/ic_launcher_foreground.xml b/DBTApp/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/DBTApp/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/DBTApp/app/src/main/res/layout/activity_home.xml b/DBTApp/app/src/main/res/layout/activity_home.xml new file mode 100644 index 0000000..c93b3b1 --- /dev/null +++ b/DBTApp/app/src/main/res/layout/activity_home.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DBTApp/app/src/main/res/layout/content_home.xml b/DBTApp/app/src/main/res/layout/content_home.xml new file mode 100644 index 0000000..8ca99fb --- /dev/null +++ b/DBTApp/app/src/main/res/layout/content_home.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/DBTApp/app/src/main/res/layout/fragment_first.xml b/DBTApp/app/src/main/res/layout/fragment_first.xml new file mode 100644 index 0000000..fcb2229 --- /dev/null +++ b/DBTApp/app/src/main/res/layout/fragment_first.xml @@ -0,0 +1,34 @@ + + + +