From 4d8fa0e13ec70363b04d2e2484266f0049c2a8f7 Mon Sep 17 00:00:00 2001 From: "jeremy.ducourthial" Date: Tue, 27 Feb 2024 14:22:05 +0100 Subject: [PATCH] feat : ajout android 21 base projet --- Android/.gitignore | 15 ++ Android/app/.gitignore | 1 + Android/app/build.gradle | 44 +++++ Android/app/proguard-rules.pro | 21 ++ .../mathseduc/ExampleInstrumentedTest.kt | 24 +++ Android/app/src/main/AndroidManifest.xml | 23 +++ .../com/example/mathseduc/MainActivity.kt | 27 +++ .../com/example/mathseduc/MultiActivity.kt | 28 +++ .../mathseduc/ServerDetailsActivity.kt | 12 ++ .../drawable-v24/ic_launcher_foreground.xml | 30 +++ .../res/drawable/ic_launcher_background.xml | 170 ++++++++++++++++ .../app/src/main/res/layout/activity_main.xml | 31 +++ .../src/main/res/layout/activity_multi.xml | 13 ++ .../res/layout/activity_server_details.xml | 15 ++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../res/mipmap-anydpi-v33/ic_launcher.xml | 6 + .../src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes .../src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes .../app/src/main/res/values-night/themes.xml | 16 ++ Android/app/src/main/res/values/colors.xml | 10 + Android/app/src/main/res/values/strings.xml | 5 + Android/app/src/main/res/values/themes.xml | 16 ++ Android/app/src/main/res/xml/backup_rules.xml | 13 ++ .../main/res/xml/data_extraction_rules.xml | 19 ++ .../com/example/mathseduc/ExampleUnitTest.kt | 17 ++ Android/build.gradle | 6 + Android/gradle.properties | 23 +++ .../gradle/wrapper/gradle-wrapper.properties | 6 + Android/gradlew | 185 ++++++++++++++++++ Android/gradlew.bat | 89 +++++++++ Android/settings.gradle | 16 ++ 40 files changed, 891 insertions(+) create mode 100644 Android/.gitignore create mode 100644 Android/app/.gitignore create mode 100644 Android/app/build.gradle create mode 100644 Android/app/proguard-rules.pro create mode 100644 Android/app/src/androidTest/java/com/example/mathseduc/ExampleInstrumentedTest.kt create mode 100644 Android/app/src/main/AndroidManifest.xml create mode 100644 Android/app/src/main/java/com/example/mathseduc/MainActivity.kt create mode 100644 Android/app/src/main/java/com/example/mathseduc/MultiActivity.kt create mode 100644 Android/app/src/main/java/com/example/mathseduc/ServerDetailsActivity.kt create mode 100644 Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 Android/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 Android/app/src/main/res/layout/activity_main.xml create mode 100644 Android/app/src/main/res/layout/activity_multi.xml create mode 100644 Android/app/src/main/res/layout/activity_server_details.xml create mode 100644 Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 Android/app/src/main/res/mipmap-anydpi-v33/ic_launcher.xml create mode 100644 Android/app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 Android/app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 Android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 Android/app/src/main/res/values-night/themes.xml create mode 100644 Android/app/src/main/res/values/colors.xml create mode 100644 Android/app/src/main/res/values/strings.xml create mode 100644 Android/app/src/main/res/values/themes.xml create mode 100644 Android/app/src/main/res/xml/backup_rules.xml create mode 100644 Android/app/src/main/res/xml/data_extraction_rules.xml create mode 100644 Android/app/src/test/java/com/example/mathseduc/ExampleUnitTest.kt create mode 100644 Android/build.gradle create mode 100644 Android/gradle.properties create mode 100644 Android/gradle/wrapper/gradle-wrapper.properties create mode 100644 Android/gradlew create mode 100644 Android/gradlew.bat create mode 100644 Android/settings.gradle diff --git a/Android/.gitignore b/Android/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/Android/.gitignore @@ -0,0 +1,15 @@ +*.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 diff --git a/Android/app/.gitignore b/Android/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/Android/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/Android/app/build.gradle b/Android/app/build.gradle new file mode 100644 index 0000000..9f3c60b --- /dev/null +++ b/Android/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.example.mathseduc' + compileSdk 34 + + defaultConfig { + applicationId "com.example.mathseduc" + minSdk 21 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + +} + +dependencies { + + implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.11.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' +} \ No newline at end of file diff --git a/Android/app/proguard-rules.pro b/Android/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/Android/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/Android/app/src/androidTest/java/com/example/mathseduc/ExampleInstrumentedTest.kt b/Android/app/src/androidTest/java/com/example/mathseduc/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..2771860 --- /dev/null +++ b/Android/app/src/androidTest/java/com/example/mathseduc/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.mathseduc + +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("com.example.mathseduc", appContext.packageName) + } +} \ No newline at end of file diff --git a/Android/app/src/main/AndroidManifest.xml b/Android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..e793a5a --- /dev/null +++ b/Android/app/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + = + + + + + + + + \ No newline at end of file diff --git a/Android/app/src/main/java/com/example/mathseduc/MainActivity.kt b/Android/app/src/main/java/com/example/mathseduc/MainActivity.kt new file mode 100644 index 0000000..311a7f3 --- /dev/null +++ b/Android/app/src/main/java/com/example/mathseduc/MainActivity.kt @@ -0,0 +1,27 @@ +package com.example.mathseduc + +import android.content.Intent +import android.os.Bundle +import android.widget.Button +import androidx.appcompat.app.AppCompatActivity + +class MainActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + var btnSolo = findViewById