diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000000000000000000000000000000000000..8c64d10c13b85483dfe4d274049f07e4aa4350a5 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,45 @@ +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "fr.ul.demomobile" + compileSdk = 35 + + defaultConfig { + applicationId = "fr.ul.demomobile" + minSdk = 30 + 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 + } +} + +dependencies { + + implementation(libs.appcompat) + implementation(libs.material) + implementation(libs.activity) + implementation(libs.constraintlayout) + testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) + implementation(libs.play.services.location) + implementation ("com.squareup.okhttp3:okhttp:4.9.1") +} \ No newline at end of file diff --git a/app/key.jks b/app/key.jks new file mode 100644 index 0000000000000000000000000000000000000000..696aca622446ee6c972dd9093b8c50dbba1a0b2f Binary files /dev/null and b/app/key.jks differ diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/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/app/release/app-release.apk b/app/release/app-release.apk new file mode 100644 index 0000000000000000000000000000000000000000..e0ca94c433722a1f7597246fa96afe59dbe5c3a9 Binary files /dev/null and b/app/release/app-release.apk differ diff --git a/app/release/baselineProfiles/0/app-release.dm b/app/release/baselineProfiles/0/app-release.dm new file mode 100644 index 0000000000000000000000000000000000000000..64fb685dbd3c3f964e28854b79cc1aab72d01856 Binary files /dev/null and b/app/release/baselineProfiles/0/app-release.dm differ diff --git a/app/release/baselineProfiles/1/app-release.dm b/app/release/baselineProfiles/1/app-release.dm new file mode 100644 index 0000000000000000000000000000000000000000..426315e2fcd09708db367836bab86756c56f90fc Binary files /dev/null and b/app/release/baselineProfiles/1/app-release.dm differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..5b29b77b9edd5865649b07f06f67e0dc9551980e --- /dev/null +++ b/app/release/output-metadata.json @@ -0,0 +1,37 @@ +{ + "version": 3, + "artifactType": { + "type": "APK", + "kind": "Directory" + }, + "applicationId": "fr.ul.demomobile", + "variantName": "release", + "elements": [ + { + "type": "SINGLE", + "filters": [], + "attributes": [], + "versionCode": 1, + "versionName": "1.0", + "outputFile": "app-release.apk" + } + ], + "elementType": "File", + "baselineProfiles": [ + { + "minApi": 28, + "maxApi": 30, + "baselineProfiles": [ + "baselineProfiles/1/app-release.dm" + ] + }, + { + "minApi": 31, + "maxApi": 2147483647, + "baselineProfiles": [ + "baselineProfiles/0/app-release.dm" + ] + } + ], + "minSdkVersionForDexing": 30 +} \ No newline at end of file diff --git a/app/src/androidTest/java/fr/ul/demomobile/ExampleInstrumentedTest.java b/app/src/androidTest/java/fr/ul/demomobile/ExampleInstrumentedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..708a89ec2ac4201453707f3e110a4fd938230ae0 --- /dev/null +++ b/app/src/androidTest/java/fr/ul/demomobile/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package fr.ul.demomobile; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("fr.ul.demomobile", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..0ca901feeb8cd6c9487e92755f8a1c3df7efe1c8 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools"> + + <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> + <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> + <uses-permission android:name="android.permission.INTERNET" /> + + + <application + android:allowBackup="true" + android:dataExtractionRules="@xml/data_extraction_rules" + android:fullBackupContent="@xml/backup_rules" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.DemoMobile" + tools:targetApi="31"> + <activity + android:name=".MainActivity" + android:theme="@style/Theme.AppCompat.Light.DarkActionBar" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <activity android:name=".Page2"></activity> + </application> + +</manifest> \ No newline at end of file diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000000000000000000000000000000000000..bce39c776782de9831e9d305593598ca278cc06c Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ diff --git a/app/src/main/java/fr/ul/demomobile/MainActivity.java b/app/src/main/java/fr/ul/demomobile/MainActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..3326dec316e808ab885970f52d548651baba7dfb --- /dev/null +++ b/app/src/main/java/fr/ul/demomobile/MainActivity.java @@ -0,0 +1,194 @@ +package fr.ul.demomobile; + +import static android.icu.lang.UCharacter.GraphemeClusterBreak.L; + +import android.annotation.SuppressLint; +import android.app.Activity; +import android.content.Intent; +import android.content.res.Configuration; +import android.graphics.Bitmap; +import android.os.Bundle; +import android.provider.MediaStore; +import android.renderscript.ScriptGroup; +import android.util.Log; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.Toast; +import android.widget.Toolbar; + +import androidx.activity.EdgeToEdge; +import androidx.activity.result.ActivityResult; +import androidx.activity.result.ActivityResultCallback; +import androidx.activity.result.ActivityResultLauncher; +import androidx.activity.result.contract.ActivityResultContracts; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +import com.google.android.material.snackbar.Snackbar; + +import java.util.Locale; + +public class MainActivity extends AppCompatActivity implements View.OnClickListener{ + ActivityResultLauncher<Intent> page2Launcher; + ImageView photoView; + + ActivityResultLauncher<Intent> photoLauncher; + String currentLanguage; + + @SuppressLint("MissingInflatedId") + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + currentLanguage = Locale.getDefault().getLanguage(); + if (currentLanguage.equals("fr")) { + setLanguage("fr"); + } else { + setLanguage("en"); + } + setContentView(R.layout.activity_main); + 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; + }); + + Button buttonPage = findViewById(R.id.page); + buttonPage.setOnClickListener(this); + + Button buttonPhoto = findViewById(R.id.photo); + buttonPhoto.setOnClickListener(this); + + photoView = findViewById(R.id.imageView); + + photoLauncher = registerForActivityResult( + new ActivityResultContracts.StartActivityForResult(), + new ActivityResultCallback<ActivityResult>() { + @Override + public void onActivityResult(ActivityResult o) { + if(o.getResultCode() == Activity.RESULT_OK){ + Intent data = o.getData(); + if(data != null && data.getExtras() != null){ + Bitmap photo = (Bitmap) data.getExtras().get("data"); + if(photo != null){ + photoView.setImageBitmap(photo); + String message = "Photo prise : " + photo.getWidth() + "x" + photo.getHeight(); + Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show(); + Log.i("PHOTO", message); + } + } + } else { + Toast.makeText(MainActivity.this, "Retour de photo invalide", Toast.LENGTH_SHORT).show(); + } + } + } + + ); + + + + page2Launcher = registerForActivityResult( + new ActivityResultContracts.StartActivityForResult(), + result -> { + if (result.getResultCode() == Activity.RESULT_FIRST_USER) { + String dateRetour = result.getData().getStringExtra("dateRetour"); + Toast.makeText(MainActivity.this, "Date retour : " + dateRetour, Toast.LENGTH_LONG).show(); + } + } + ); + + } + + public void onBonjour(View view){ + String message; + if(currentLanguage.equals("fr")) { + message = "Bonjour !"; + }else{ + message = "Hello !"; + } + Toast.makeText(this, message, Toast.LENGTH_SHORT).show(); + Log.i("BONJOUR", message); + } + + @Override + public void onClick(View v) { + if(v.getId() == R.id.page){ + Intent intent = new Intent(MainActivity.this, Page2.class); + if(currentLanguage.equals("fr")) { + intent.putExtra("info", "Bonjour depuis mainActivity"); + }else{ + intent.putExtra("info", "Hello from mainActivity"); + } + intent.putExtra("val", 42); + intent.putExtra("currentLanguage", currentLanguage); + page2Launcher.launch(intent); + //String message = "page"; + //Snackbar.make(v, message, Snackbar.LENGTH_LONG).setAction("OK", new View.OnClickListener(){ +// @Override +// public void onClick(View v){ +// Log.i("SNACKBAR", message); +// } +// }).show(); + } else if (v.getId() == R.id.photo){ + Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); + if(intent.resolveActivity(getPackageManager()) != null) { + photoLauncher.launch(intent); + }else { + Toast.makeText(this, "Aucune application de caméra disponible", Toast.LENGTH_SHORT).show(); + } + } + } + private void setLanguage(String language) { + if (currentLanguage != null && currentLanguage.equals(language)) { + return; + } + + Locale locale = new Locale(language); + Locale.setDefault(locale); + + Configuration config = new Configuration(); + config.locale = locale; + + getResources().updateConfiguration(config, getResources().getDisplayMetrics()); + currentLanguage = language; + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + getMenuInflater().inflate(R.menu.menu_main, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + Button buttonPhoto = findViewById(R.id.photo); + Button buttonPage = findViewById(R.id.page); + Button buttonBonjour = findViewById(R.id.bonjour); + if (item.getItemId() == R.id.action_change_language) { + if (currentLanguage.equals("fr")) { + setLanguage("en"); + Log.i("LANGUE", currentLanguage); + item.setTitle(R.string.menu_language); // Change le titre + buttonPage.setText(R.string.page); + buttonPhoto.setText(R.string.picture); + buttonBonjour.setText(R.string.hello); + } else { + setLanguage("fr"); + Log.i("LANGUE", currentLanguage); + item.setTitle(R.string.menu_language); + buttonPage.setText(R.string.page); + buttonPhoto.setText(R.string.picture); + buttonBonjour.setText(R.string.hello); + } + return true; + } + return super.onOptionsItemSelected(item); + } + +} \ No newline at end of file diff --git a/app/src/main/java/fr/ul/demomobile/Page2.java b/app/src/main/java/fr/ul/demomobile/Page2.java new file mode 100644 index 0000000000000000000000000000000000000000..8ffb0e13dd9ad36141291b51287b6340bcde7ac7 --- /dev/null +++ b/app/src/main/java/fr/ul/demomobile/Page2.java @@ -0,0 +1,181 @@ +package fr.ul.demomobile; + +import android.Manifest; +import android.annotation.SuppressLint; +import android.app.Activity; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.os.Bundle; +import android.util.Log; +import android.widget.Button; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.activity.EdgeToEdge; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; + +import com.google.android.gms.location.FusedLocationProviderClient; +import com.google.android.gms.location.LocationServices; + +import org.json.JSONObject; + +import java.io.IOException; +import java.util.Calendar; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +public class Page2 extends AppCompatActivity { + private static final int LOCATION_PERMISSION_REQUEST_CODE = 1; + private final ExecutorService executorService = Executors.newSingleThreadExecutor(); + private final OkHttpClient httpClient = new OkHttpClient(); + + private FusedLocationProviderClient fusedLocationClient; + private TextView locationText; + private TextView weatherText; + + @SuppressLint("SetTextI18n") + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.page2); + + locationText = findViewById(R.id.locali); + weatherText = findViewById(R.id.weatherText); + + Intent intent = getIntent(); + String info = intent.getStringExtra("info"); + int val = intent.getIntExtra("val", 0); + String currentLanguage = intent.getStringExtra("currentLanguage"); + + TextView textViewInfo = findViewById(R.id.textViewInfo); + assert currentLanguage != null; + if(currentLanguage.equals("fr")) { + textViewInfo.setText("Info : " + info + "\nValeur : " + val); + }else{ + textViewInfo.setText("Info : " + info + "\nValue : " + val); + } + + fusedLocationClient = LocationServices.getFusedLocationProviderClient(this); + Button locationButton = findViewById(R.id.localisation); + locationButton.setOnClickListener(v -> demandePermissionLoca()); + + Button buttonRetour = findViewById(R.id.retour); + buttonRetour.setOnClickListener(v -> retourBouton()); + + if(currentLanguage.equals("fr")){ + locationButton.setText(getString(R.string.location_button)); + buttonRetour.setText(getString(R.string.back_button)); + } else { + locationButton.setText(getString(R.string.location_button)); + buttonRetour.setText(getString(R.string.back_button)); + } + } + + + private void retourBouton() { + Intent resultIntent = new Intent(); + String currentDate = Calendar.getInstance().getTime().toString(); + resultIntent.putExtra("dateRetour", currentDate); + setResult(Activity.RESULT_FIRST_USER, resultIntent); + finish(); + } + + private void demandePermissionLoca() { + if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { + ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_PERMISSION_REQUEST_CODE); + } else { + getLocation(); + } + } + + @SuppressLint("MissingPermission") + private void getLocation() { + fusedLocationClient.getLastLocation() + .addOnSuccessListener(this, location -> { + if (location != null) { + String position = String.format(getString(R.string.location_format), + location.getLatitude(), location.getLongitude()); + locationText.setText(position); + fetchWeatherData(location.getLatitude(), location.getLongitude()); + } else { + locationText.setText(getString(R.string.location_unavailable)); + } + }) + .addOnFailureListener(e -> + Toast.makeText(this, getString(R.string.location_error, e.getMessage()), + Toast.LENGTH_SHORT).show()); + } + + + private void fetchWeatherData(double latitude, double longitude) { + String url = String.format("https://api.open-meteo.com/v1/forecast?latitude=%s&longitude=%s¤t=temperature_2m,wind_speed_10m,wind_direction_10m,precipitation_probability,cloud_cover", latitude, longitude); + + new Thread(() -> { + try { + Request request = new Request.Builder().url(url).build(); + try (Response response = httpClient.newCall(request).execute()) { + if (response.body() != null) { + String responseData = response.body().string(); + runOnUiThread(() -> processWeatherData(responseData)); + } + } + } catch (IOException e) { + showError("Erreur réseau: " + e.getMessage()); + } + }).start(); + } + + private void processWeatherData(String jsonData) { + try { + JSONObject currentWeather = new JSONObject(jsonData).getJSONObject("current"); + Log.e("WeatherData", jsonData); + + double temperature = currentWeather.getDouble("temperature_2m"); + double precipitationProbability = currentWeather.getDouble("precipitation_probability"); + double cloudCover = currentWeather.getDouble("cloud_cover"); + double windSpeed = currentWeather.getDouble("wind_speed_10m"); + double windDirection = currentWeather.getDouble("wind_direction_10m"); + + String weatherInfo = getString(R.string.weather_info, temperature, precipitationProbability, cloudCover, windSpeed, windDirection); + + weatherText.setText(weatherInfo); + } catch (Exception e) { + showError("Erreur données: " + e.getMessage()); + } + } + + + + private void showError(String message) { + runOnUiThread(() -> Toast.makeText(this, message, Toast.LENGTH_SHORT).show()); + } + + + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, + @NonNull int[] grantResults) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + if (requestCode == LOCATION_PERMISSION_REQUEST_CODE) { + if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + getLocation(); + } else { + Toast.makeText(this, R.string.location_error, + Toast.LENGTH_SHORT).show(); + } + } + } + + @Override + protected void onDestroy() { + super.onDestroy(); + executorService.shutdown(); + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca3826a46ce070f906d0d3fbe6987df882134381 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector + android:height="108dp" + android:width="108dp" + android:viewportHeight="108" + android:viewportWidth="108" + xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z"/> + <path android:fillColor="#00000000" android:pathData="M9,0L9,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,0L19,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M29,0L29,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M39,0L39,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M49,0L49,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M59,0L59,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M69,0L69,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M79,0L79,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M89,0L89,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M99,0L99,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,9L108,9" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,19L108,19" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,29L108,29" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,39L108,39" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,49L108,49" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,59L108,59" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,69L108,69" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,79L108,79" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,89L108,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,99L108,99" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,29L89,29" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,39L89,39" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,49L89,49" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,59L89,59" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,69L89,69" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,79L89,79" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M29,19L29,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M39,19L39,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M49,19L49,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M59,19L59,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M69,19L69,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M79,19L79,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> +</vector> diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..8735b5d714e6066c964830796c2a28195512fb57 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,54 @@ +<?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=".MainActivity"> + + <Button + android:id="@+id/bonjour" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="18dp" + android:onClick="onBonjour" + android:text="Bonjour" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <Button + android:id="@+id/page" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="32dp" + android:layout_marginTop="18dp" + android:layout_marginEnd="32dp" + android:text="Page" + app:layout_constraintEnd_toStartOf="@+id/photo" + app:layout_constraintStart_toEndOf="@+id/bonjour" + app:layout_constraintTop_toTopOf="parent" /> + + <Button + android:id="@+id/photo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="18dp" + android:layout_marginEnd="16dp" + android:text="Photo" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/imageView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="183dp" + android:layout_marginTop="110dp" + android:layout_marginEnd="156dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/page" + app:srcCompat="@mipmap/ic_launcher_round" /> +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/page2.xml b/app/src/main/res/layout/page2.xml new file mode 100644 index 0000000000000000000000000000000000000000..0913a1e90a032a0b06a0e205feff0ebaa913a831 --- /dev/null +++ b/app/src/main/res/layout/page2.xml @@ -0,0 +1,67 @@ +<?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:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="16dp" + android:background="@color/black"> + + <TextView + android:id="@+id/textViewInfo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Informations" + android:textSize="18sp" + android:textColor="@color/white" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> + + <Button + android:id="@+id/retour" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="32dp" + android:layout_marginTop="72dp" + android:text="Retour" + android:textColor="@color/white" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <Button + android:id="@+id/localisation" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Localisation" + android:textColor="@color/white" + android:layout_marginTop="16dp" + app:layout_constraintTop_toBottomOf="@id/retour" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> + + <TextView + android:id="@+id/locali" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Localisation : inconnue" + android:textSize="16sp" + android:textColor="@color/white" + android:layout_marginTop="8dp" + app:layout_constraintTop_toBottomOf="@id/localisation" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> + + <TextView + android:id="@+id/weatherText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Météo : inconnue" + android:textSize="16sp" + android:textColor="@color/white" + android:layout_marginTop="8dp" + app:layout_constraintTop_toBottomOf="@id/locali" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..b95f2aee836f2021ab0915cef77ec7eac5b12ada --- /dev/null +++ b/app/src/main/res/menu/menu_main.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + <item + android:id="@+id/action_change_language" + android:icon="@drawable/ic_launcher_foreground" + android:title="@string/app_name" + app:showAsAction="always" /> +</menu> diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..c4a603d4cce78b2fbd8094bd0224d4778bc8c976 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> +</adaptive-icon> \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..c4a603d4cce78b2fbd8094bd0224d4778bc8c976 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> +</adaptive-icon> \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..5a6100d2202fb47a1035c53fe8bf03af95ee883b Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..497f885f1fba9c7f807eb52fcd78387f3ab8c6a9 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..4b96b2bdf1f2ca6994477408f10013f21736554b Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..bae6ebe8cc7de0e406b6d638883fda8593ae2cf0 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..97ae89a535955605803e9f37884492a2e21cdd29 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..1beaaf7ef13da5dc345fa9f2a146dfb6b3887f22 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..c5c66f88496318fe2cc88857d8ac3a7e8bca3cc7 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..0b8ee58e82bedb4b15b271a7917056fea9ce3c59 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..f6d42ad028cc357ad8ac85af2413411c18240a8d Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..5ffdd50917382b0c3bf089a190e879f84987e737 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..740a05a27f7da7237dce82646c7559848cdb190c Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..d82943990156de6f2d6db3731d2b52f8b5ad538e Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..422c44be75716b27eb99444d8c90d01163034727 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000000000000000000000000000000000000..dc3486ddb4daa8f5f923f43862c26700fd4972bd Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..0fc0b6c3cfae8bc9e6ff15999f5e4f8ecb82ca38 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..7ce808729002e7d015bd77040b7fe736ce7db1b1 --- /dev/null +++ b/app/src/main/res/values-en/strings.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources><string name="app_name">DemoMobile</string> + <string name="menu_language">French</string> + <string name="hello">Hello</string> + <string name="picture">Picture</string> + <string name="page">Page</string> + <string name="location_button">Location</string> + <string name="back_button">Back</string> + <string name="permission_denied">Location permission denied</string> + <string name="weather_info">Temperature: %1$.1f°C\nPrecipitation: %2$.1f%%\nCloud cover: %3$.1f%%\nWind: %4$.1f km/h\nWind direction: %5$.1f°</string> + <string name="location_format">Latitude: %.4f, Longitude: %.4f</string> + <string name="location_unavailable">Location not available.</string> + <string name="location_error">Location error: %1$s</string> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-en/values-night/themes.xml b/app/src/main/res/values-en/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca905dc4ae8c0b3c2bb4ece74c215538e037dc3f --- /dev/null +++ b/app/src/main/res/values-en/values-night/themes.xml @@ -0,0 +1,7 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Base.Theme.DemoMobile" parent="Theme.Material3.DayNight.NoActionBar"> + <!-- Customize your dark theme here. --> + <!-- <item name="colorPrimary">@color/my_dark_primary</item> --> + </style> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-en/values/colors.xml b/app/src/main/res/values-en/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..c8524cd961d27b6695e755c6ef2d4d58cf38431e --- /dev/null +++ b/app/src/main/res/values-en/values/colors.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-en/values/ids.xml b/app/src/main/res/values-en/values/ids.xml new file mode 100644 index 0000000000000000000000000000000000000000..31bef155ad72357df3a87e9872553536631ef74e --- /dev/null +++ b/app/src/main/res/values-en/values/ids.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <item name="buttonBonjour" type="id" /> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-en/values/strings.xml b/app/src/main/res/values-en/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..ef4499f5490eb7292a85d7962767ecc92589d2ca --- /dev/null +++ b/app/src/main/res/values-en/values/strings.xml @@ -0,0 +1,6 @@ +<resources> + <string name="app_name">DemoMobile</string> + <string name="menu_language">Anglais</string> + <string name="hello">Bonjour</string> + <string name="button_text">Cliquez ici</string> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-en/values/themes.xml b/app/src/main/res/values-en/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..0997c2f3a6dd2b6028e2496a2ace3d1b7db14ac4 --- /dev/null +++ b/app/src/main/res/values-en/values/themes.xml @@ -0,0 +1,9 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Base.Theme.DemoMobile" parent="Theme.Material3.DayNight.NoActionBar"> + <!-- Customize your light theme here. --> + <!-- <item name="colorPrimary">@color/my_light_primary</item> --> + </style> + + <style name="Theme.DemoMobile" parent="Base.Theme.DemoMobile" /> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca905dc4ae8c0b3c2bb4ece74c215538e037dc3f --- /dev/null +++ b/app/src/main/res/values-night/themes.xml @@ -0,0 +1,7 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Base.Theme.DemoMobile" parent="Theme.Material3.DayNight.NoActionBar"> + <!-- Customize your dark theme here. --> + <!-- <item name="colorPrimary">@color/my_dark_primary</item> --> + </style> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..c8524cd961d27b6695e755c6ef2d4d58cf38431e --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml new file mode 100644 index 0000000000000000000000000000000000000000..31bef155ad72357df3a87e9872553536631ef74e --- /dev/null +++ b/app/src/main/res/values/ids.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <item name="buttonBonjour" type="id" /> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..16987ba8d4b5d6a3f924c1adbf40c420e9df7fa0 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,14 @@ +<resources> + <string name="app_name">DemoMobile</string> + <string name="menu_language">Francais</string> + <string name="hello">Bonjour</string> + <string name="picture">Photo</string> + <string name="page">Page</string> + <string name="location_button">Emplacement</string> + <string name="back_button">Retour</string> + <string name="permission_denied">Permission de localisation refusée</string> + <string name="weather_info">Température : %1$.1f°C\nPrécipitations : %2$.1f%%\nCouverture nuageuse : %3$.1f%%\nVent : %4$.1f km/h\nDirection du vent : %5$.1f°</string> + <string name="location_format">Latitude: %.4f, Longitude: %.4f</string> + <string name="location_unavailable">La localisation n\'est pas disponible.</string> + <string name="location_error">Erreur de localisation: %1$s</string> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..0997c2f3a6dd2b6028e2496a2ace3d1b7db14ac4 --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,9 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Base.Theme.DemoMobile" parent="Theme.Material3.DayNight.NoActionBar"> + <!-- Customize your light theme here. --> + <!-- <item name="colorPrimary">@color/my_light_primary</item> --> + </style> + + <style name="Theme.DemoMobile" parent="Base.Theme.DemoMobile" /> +</resources> \ No newline at end of file diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml new file mode 100644 index 0000000000000000000000000000000000000000..fa0f996d2c2a6bdd11f5371de4268c8389d6c720 --- /dev/null +++ b/app/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample backup rules file; uncomment and customize as necessary. + See https://developer.android.com/guide/topics/data/autobackup + for details. + Note: This file is ignored for devices older that API 31 + See https://developer.android.com/about/versions/12/backup-restore +--> +<full-backup-content> + <!-- + <include domain="sharedpref" path="."/> + <exclude domain="sharedpref" path="device.xml"/> +--> +</full-backup-content> \ No newline at end of file diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 0000000000000000000000000000000000000000..9ee9997b0b4726e57c27b2f7b21462b604ff8a88 --- /dev/null +++ b/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample data extraction rules file; uncomment and customize as necessary. + See https://developer.android.com/about/versions/12/backup-restore#xml-changes + for details. +--> +<data-extraction-rules> + <cloud-backup> + <!-- TODO: Use <include> and <exclude> to control what is backed up. + <include .../> + <exclude .../> + --> + </cloud-backup> + <!-- + <device-transfer> + <include .../> + <exclude .../> + </device-transfer> + --> +</data-extraction-rules> \ No newline at end of file diff --git a/app/src/test/java/fr/ul/demomobile/ExampleUnitTest.java b/app/src/test/java/fr/ul/demomobile/ExampleUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..cb26d4b8a5b3ba7dc3c9f41fbeeeda057449f8fa --- /dev/null +++ b/app/src/test/java/fr/ul/demomobile/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package fr.ul.demomobile; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file