From d77a0444ab5b94d16ccdb275aa9347d77a55a25c Mon Sep 17 00:00:00 2001 From: Yannis Devos <yannis.devos.etu@univ-lille.fr> Date: Mon, 10 Mar 2025 14:28:27 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20du=20layout=20Super=20t=C3=A2ches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.name | 0 .idea/deploymentTargetSelector.xml | 0 .idea/runConfigurations.xml | 0 .idea/vcs.xml | 0 README.md | 0 app/build.gradle.kts | 3 +- app/src/main/AndroidManifest.xml | 8 +++-- .../fr/iutlille/ctp2024/MainActivity.java | 2 +- .../java/fr/iutlille/ctp2024/SuperTache.java | 24 +++++++++++++ .../main/res/layout/activity_super_tache.xml | 34 ++++++++++++++++++ build.gradle.kts | 2 +- demo.apk | Bin figs/Q2.png | Bin figs/Q2_small.png | Bin figs/activite1.png | Bin figs/activite1_small.png | Bin figs/activite2.png | Bin figs/activite2_small.png | Bin gradle/wrapper/gradle-wrapper.properties | 2 +- 19 files changed, 69 insertions(+), 6 deletions(-) mode change 100644 => 100755 .idea/.name mode change 100644 => 100755 .idea/deploymentTargetSelector.xml mode change 100644 => 100755 .idea/runConfigurations.xml mode change 100644 => 100755 .idea/vcs.xml mode change 100644 => 100755 README.md create mode 100755 app/src/main/java/fr/iutlille/ctp2024/SuperTache.java create mode 100755 app/src/main/res/layout/activity_super_tache.xml mode change 100644 => 100755 demo.apk mode change 100644 => 100755 figs/Q2.png mode change 100644 => 100755 figs/Q2_small.png mode change 100644 => 100755 figs/activite1.png mode change 100644 => 100755 figs/activite1_small.png mode change 100644 => 100755 figs/activite2.png mode change 100644 => 100755 figs/activite2_small.png diff --git a/.idea/.name b/.idea/.name old mode 100644 new mode 100755 diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml old mode 100644 new mode 100755 diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml old mode 100644 new mode 100755 diff --git a/.idea/vcs.xml b/.idea/vcs.xml old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4fed2d4..bc7ed88 100755 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -4,7 +4,7 @@ plugins { android { namespace = "fr.iutlille.ctp2024" - compileSdk = 34 + compileSdk = 35 defaultConfig { applicationId = "fr.iutlille.ctp2024" @@ -36,6 +36,7 @@ dependencies { implementation("androidx.appcompat:appcompat:1.6.1") implementation("com.google.android.material:material:1.11.0") implementation("androidx.constraintlayout:constraintlayout:2.1.4") + implementation("androidx.activity:activity:1.10.0") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1a3e297..89fada7 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools"> <application + android:name=".TacheApplication" android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules" android:fullBackupContent="@xml/backup_rules" @@ -11,13 +12,16 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.CTP2024" - tools:targetApi="31" - android:name=".TacheApplication"> + tools:targetApi="31"> + <activity + android:name=".SuperTache" + android:exported="false" /> <activity android:name=".MainActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> diff --git a/app/src/main/java/fr/iutlille/ctp2024/MainActivity.java b/app/src/main/java/fr/iutlille/ctp2024/MainActivity.java index 3189b9f..05a6e78 100755 --- a/app/src/main/java/fr/iutlille/ctp2024/MainActivity.java +++ b/app/src/main/java/fr/iutlille/ctp2024/MainActivity.java @@ -9,6 +9,6 @@ public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); + setContentView(R.layout.activity_super_tache); } } \ No newline at end of file diff --git a/app/src/main/java/fr/iutlille/ctp2024/SuperTache.java b/app/src/main/java/fr/iutlille/ctp2024/SuperTache.java new file mode 100755 index 0000000..c0df3bf --- /dev/null +++ b/app/src/main/java/fr/iutlille/ctp2024/SuperTache.java @@ -0,0 +1,24 @@ +package fr.iutlille.ctp2024; + +import android.os.Bundle; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +public class SuperTache extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_super_tache); + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { + Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); + return insets; + }); + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/activity_super_tache.xml b/app/src/main/res/layout/activity_super_tache.xml new file mode 100755 index 0000000..e29990c --- /dev/null +++ b/app/src/main/res/layout/activity_super_tache.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/main" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".SuperTache"> + + + <TextView + android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAlignment="center" + android:textSize="50dp" + android:text="Super Tâches"/> + + <Button + android:id="@+id/myTasks" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="MES TÂCHES" + app:layout_constraintTop_toBottomOf="@+id/title" /> + + <Button + android:id="@+id/quitButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="QUITTER" + app:layout_constraintTop_toBottomOf="@+id/myTasks" /> + + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 196e647..234e938 100755 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,4 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.2.2" apply false + id("com.android.application") version "8.8.0" apply false } \ No newline at end of file diff --git a/demo.apk b/demo.apk old mode 100644 new mode 100755 diff --git a/figs/Q2.png b/figs/Q2.png old mode 100644 new mode 100755 diff --git a/figs/Q2_small.png b/figs/Q2_small.png old mode 100644 new mode 100755 diff --git a/figs/activite1.png b/figs/activite1.png old mode 100644 new mode 100755 diff --git a/figs/activite1_small.png b/figs/activite1_small.png old mode 100644 new mode 100755 diff --git a/figs/activite2.png b/figs/activite2.png old mode 100644 new mode 100755 diff --git a/figs/activite2_small.png b/figs/activite2_small.png old mode 100644 new mode 100755 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 386fe19..a005a5d 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Apr 10 15:38:59 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -- GitLab