Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
- Versioned JSON import/export for non-sensitive correction preferences, using Android's system document picker without storage permissions; the personal dictionary is intentionally excluded.
- Dedicated correction status screen showing the native Android spell-checker and Grammalecte IME activation/selection state, with direct access to the relevant system settings.
- First-run setup guide explaining the three correction modes, showing live activation state and providing direct access to the relevant Android settings; the guide is shown once automatically and remains available from the main screen.
- Application visual identity with adaptive and themed launcher icons, a matching Quick Settings icon, branded accent colors and a concise launcher label.

### Changed

Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Exit criterion: correction remains usable in common editable applications even w

## Phase 4 — Product polish

- [ ] Application icon and visual identity
- [x] Application icon and visual identity
- [x] Improve first-run setup
- [x] Explain the three correction modes in-app
- [ ] Improve accessibility of the application UI
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package fr.grammalecteandroid.unofficial

import android.content.ComponentName
import android.content.Context
import android.content.pm.PackageManager
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class VisualIdentityManifestTest {
@Suppress("DEPRECATION")
@Test
fun visualIdentityResourcesAreWiredToAndroidComponents() {
val context =
ApplicationProvider.getApplicationContext<Context>()

val packageManager =
context.packageManager

val application =
packageManager.getApplicationInfo(
context.packageName,
PackageManager.GET_META_DATA,
)

assertEquals(
R.mipmap.ic_launcher,
application.icon,
)

assertNotNull(
application.loadIcon(
packageManager,
),
)

assertEquals(
"Grammalecte Android (non officiel)",
application.loadLabel(packageManager).toString(),
)

val mainActivity =
packageManager.getActivityInfo(
ComponentName(
context,
MainActivity::class.java,
),
PackageManager.GET_META_DATA,
)

assertEquals(
"Grammalecte",
mainActivity.loadLabel(packageManager).toString(),
)

val tileService =
packageManager.getServiceInfo(
ComponentName(
context,
GrammalecteTileService::class.java,
),
PackageManager.GET_META_DATA,
)

assertEquals(
R.drawable.ic_qs_grammalecte,
tileService.icon,
)
}
}
5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="false">
Expand All @@ -24,7 +26,8 @@

<activity
android:name=".MainActivity"
android:exported="true">
android:exported="true"
android:label="@string/launcher_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class MainActivity :
)

setTextColor(
getColor(R.color.surface_text),
getColor(R.color.brand_primary),
)
},
matchWrapParams(),
Expand Down
31 changes: 31 additions & 0 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">

<path
android:fillColor="#FFFFFFFF"
android:pathData="M32,18H66L82,34V84C82,88.42 78.42,92 74,92H32C27.58,92 24,88.42 24,84V26C24,21.58 27.58,18 32,18Z" />

<path
android:fillColor="@color/launcher_background"
android:pathData="M66,18V34H82Z" />

<path
android:fillColor="@color/launcher_background"
android:pathData="M34,42H67V48H34Z" />

<path
android:fillColor="@color/launcher_background"
android:pathData="M34,55H60V61H34Z" />

<path
android:fillColor="@color/launcher_background"
android:pathData="M34,68H49V74H34Z" />

<path
android:fillColor="@color/launcher_check"
android:pathData="M49,73L57,81L76,59L82,64L57,91L44,78Z" />
</vector>
34 changes: 34 additions & 0 deletions app/src/main/res/drawable/ic_launcher_monochrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">

<path
android:fillColor="@android:color/transparent"
android:pathData="M32,18H66L82,34V84C82,88.42 78.42,92 74,92H32C27.58,92 24,88.42 24,84V26C24,21.58 27.58,18 32,18Z"
android:strokeColor="#FFFFFFFF"
android:strokeLineJoin="round"
android:strokeWidth="6" />

<path
android:fillColor="@android:color/transparent"
android:pathData="M66,19V34H81"
android:strokeColor="#FFFFFFFF"
android:strokeLineCap="round"
android:strokeLineJoin="round"
android:strokeWidth="6" />

<path
android:fillColor="#FFFFFFFF"
android:pathData="M34,42H64V48H34Z" />

<path
android:fillColor="#FFFFFFFF"
android:pathData="M34,55H56V61H34Z" />

<path
android:fillColor="#FFFFFFFF"
android:pathData="M49,73L57,81L76,59L82,64L57,91L44,78Z" />
</vector>
25 changes: 24 additions & 1 deletion app/src/main/res/drawable/ic_qs_grammalecte.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,30 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">

<path
android:fillColor="@android:color/transparent"
android:pathData="M6,2H14L19,7V21H6Z"
android:strokeColor="#FFFFFFFF"
android:strokeLineJoin="round"
android:strokeWidth="2" />

<path
android:fillColor="@android:color/transparent"
android:pathData="M14,2V7H19"
android:strokeColor="#FFFFFFFF"
android:strokeLineJoin="round"
android:strokeWidth="2" />

<path
android:fillColor="#FFFFFFFF"
android:pathData="M8,9H15V11H8Z" />

<path
android:fillColor="#FFFFFFFF"
android:pathData="M8,13H12V15H8Z" />

<path
android:fillColor="#FFFFFFFF"
android:pathData="M9,16.17L4.83,12L3.41,13.41L9,19L21,7L19.59,5.59Z" />
android:pathData="M11.5,17L14,19.5L19,14L20.5,15.5L14,22L10,18Z" />
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -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="@color/launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
6 changes: 6 additions & 0 deletions app/src/main/res/mipmap-anydpi-v33/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
23 changes: 23 additions & 0 deletions app/src/main/res/mipmap-anydpi/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">

<path
android:fillColor="@color/launcher_background"
android:pathData="M0,0H108V108H0Z" />

<path
android:fillColor="#FFFFFFFF"
android:pathData="M32,18H66L82,34V84C82,88.42 78.42,92 74,92H32C27.58,92 24,88.42 24,84V26C24,21.58 27.58,18 32,18Z" />

<path
android:fillColor="@color/launcher_background"
android:pathData="M66,18V34H82ZM34,42H67V48H34ZM34,55H60V61H34ZM34,68H49V74H34Z" />

<path
android:fillColor="@color/launcher_check"
android:pathData="M49,73L57,81L76,59L82,64L57,91L44,78Z" />
</vector>
1 change: 1 addition & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<color name="surface_card">#FF242428</color>
<color name="surface_text">#FFF1F1F1</color>
<color name="surface_text_secondary">#FFC4C4CC</color>
<color name="brand_primary">#FFC7D2FE</color>
</resources>
11 changes: 11 additions & 0 deletions app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<item name="android:windowBackground">@color/surface_background</item>
<item name="android:colorBackground">@color/surface_background</item>
<item name="android:textColorPrimary">@color/surface_text</item>

<item name="android:colorAccent">@color/brand_primary</item>
<item name="android:colorControlActivated">@color/brand_primary</item>
<item name="android:statusBarColor">@color/surface_background</item>
<item name="android:navigationBarColor">@color/surface_background</item>
<item name="android:windowLightStatusBar">false</item>
</style>

<style name="ImeTheme" parent="android:style/Theme.Material.NoActionBar">
Expand All @@ -14,5 +20,10 @@
<item name="android:colorBackground">@color/surface_background</item>
<item name="android:textColorPrimary">@color/surface_text</item>
<item name="android:navigationBarColor">@color/surface_background</item>

<item name="android:colorAccent">@color/brand_primary</item>
<item name="android:colorControlActivated">@color/brand_primary</item>
<item name="android:statusBarColor">@color/surface_background</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
<color name="surface_card">#FFE9E9EC</color>
<color name="surface_text">#FF202124</color>
<color name="surface_text_secondary">#FF5F6368</color>
<color name="brand_primary">#FF4338CA</color>
<color name="launcher_background">#FF4338CA</color>
<color name="launcher_check">#FF22C55E</color>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Grammalecte Android (non officiel)</string>
<string name="launcher_name">Grammalecte</string>
<string name="title">Grammalecte Android</string>
<string name="intro">Correcteur français local basé sur Grammalecte. Aucun texte n’est envoyé sur Internet.</string>
<string name="setup_steps">Pour l’activer : Paramètres Android → Système → Langues et saisie → Correcteur orthographique, puis choisissez Grammalecte Android.</string>
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<item name="android:windowBackground">@color/surface_background</item>
<item name="android:colorBackground">@color/surface_background</item>
<item name="android:textColorPrimary">@color/surface_text</item>

<item name="android:colorAccent">@color/brand_primary</item>
<item name="android:colorControlActivated">@color/brand_primary</item>
<item name="android:statusBarColor">@color/surface_background</item>
<item name="android:navigationBarColor">@color/surface_background</item>
<item name="android:windowLightStatusBar">true</item>
</style>

<style name="ImeTheme" parent="android:style/Theme.Material.Light.NoActionBar">
Expand All @@ -14,5 +20,10 @@
<item name="android:colorBackground">@color/surface_background</item>
<item name="android:textColorPrimary">@color/surface_text</item>
<item name="android:navigationBarColor">@color/surface_background</item>

<item name="android:colorAccent">@color/brand_primary</item>
<item name="android:colorControlActivated">@color/brand_primary</item>
<item name="android:statusBarColor">@color/surface_background</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>
Loading