-
Notifications
You must be signed in to change notification settings - Fork 2
feat: each theme can provide their own components drawable resources #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
florentmaitre
merged 3 commits into
develop
from
626-bug---checkbox-and-radio-button-component-for-sosh-theme-do-not-have-the-expected-look-and-feel-if-selected-state
Jul 17, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
theme-contract/src/main/java/com/orange/ouds/theme/OudsDrawableResources.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* | ||
| * Software Name: OUDS Android | ||
| * SPDX-FileCopyrightText: Copyright (c) Orange SA | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * This software is distributed under the MIT license, | ||
| * the text of which is available at https://opensource.org/license/MIT/ | ||
| * or see the "LICENSE" file for more details. | ||
| * | ||
| * Software description: Android library of reusable graphical components | ||
| */ | ||
|
|
||
| package com.orange.ouds.theme | ||
|
|
||
| import androidx.annotation.DrawableRes | ||
| import com.orange.ouds.foundation.InternalOudsApi | ||
|
|
||
| @InternalOudsApi | ||
| open class OudsDrawableResources { | ||
| open val checkboxIndeterminate: Int | ||
| @DrawableRes get() = R.drawable.ic_checkbox_indeterminate | ||
| open val checkboxSelected: Int | ||
| @DrawableRes get() = R.drawable.ic_checkbox_selected | ||
| open val chevronLeft: Int | ||
| @DrawableRes get() = R.drawable.ic_chevron_left | ||
| open val radioButtonSelected: Int | ||
| @DrawableRes get() = R.drawable.ic_radio_button_selected | ||
| open val switchSelected: Int | ||
| @DrawableRes get() = R.drawable.ic_switch_selected | ||
| open val tick: Int | ||
| @DrawableRes get() = R.drawable.ic_tick | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
theme-sosh/src/main/java/com/orange/ouds/theme/sosh/SoshDrawableResources.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* | ||
| * Software Name: OUDS Android | ||
| * SPDX-FileCopyrightText: Copyright (c) Orange SA | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * This software is distributed under the MIT license, | ||
| * the text of which is available at https://opensource.org/license/MIT/ | ||
| * or see the "LICENSE" file for more details. | ||
| * | ||
| * Software description: Android library of reusable graphical components | ||
| */ | ||
|
|
||
| package com.orange.ouds.theme.sosh | ||
|
|
||
| import com.orange.ouds.theme.OudsDrawableResources | ||
|
|
||
| class SoshDrawableResources : OudsDrawableResources() { | ||
| override val checkboxIndeterminate | ||
| get() = R.drawable.sosh_checkbox_indeterminate | ||
| override val checkboxSelected: Int | ||
| get() = R.drawable.sosh_checkbox_selected | ||
| override val chevronLeft: Int | ||
| get() = R.drawable.sosh_chevron_left | ||
| override val tick: Int | ||
| get() = R.drawable.sosh_tick | ||
| override val radioButtonSelected: Int | ||
| get() = R.drawable.sosh_radio_button_selected | ||
| override val switchSelected: Int | ||
| get() = R.drawable.sosh_switch_selected | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
theme-sosh/src/main/res/drawable/sosh_checkbox_indeterminate.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="64dp" | ||
| android:height="64dp" | ||
| android:viewportWidth="64" | ||
| android:viewportHeight="64"> | ||
| <group> | ||
| <clip-path | ||
| android:pathData="M0,0.008h64v64h-64z"/> | ||
| <path | ||
| android:pathData="M54.4,0.008C59.702,0.008 64,4.306 64,9.608V54.408C64,59.71 59.702,64.008 54.4,64.008H9.6C4.298,64.008 0,59.71 0,54.408V9.608C0,4.306 4.298,0.008 9.6,0.008H54.4ZM48,28.808H16C14.233,28.808 12.8,30.24 12.8,32.008C12.8,33.775 14.233,35.208 16,35.208H48C49.767,35.208 51.2,33.775 51.2,32.008C51.2,30.24 49.767,28.808 48,28.808Z" | ||
| android:fillColor="#000000" | ||
| android:fillType="evenOdd"/> | ||
| </group> | ||
| </vector> |
14 changes: 14 additions & 0 deletions
14
theme-sosh/src/main/res/drawable/sosh_checkbox_selected.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="64dp" | ||
| android:height="64dp" | ||
| android:viewportWidth="64" | ||
| android:viewportHeight="64"> | ||
| <group> | ||
| <clip-path | ||
| android:pathData="M0,0h64v64h-64z"/> | ||
| <path | ||
| android:pathData="M54.4,0C59.702,0 64,4.298 64,9.6V54.4C64,59.702 59.702,64 54.4,64H9.6C4.298,64 0,59.702 0,54.4V9.6C0,4.298 4.298,0 9.6,0H54.4ZM45.939,16.92L25.577,39.48L17.998,31.094C17.023,30.055 14.983,29.663 13.695,31.118C12.418,32.568 12.621,34.901 13.593,35.934L23.413,46.824C23.902,47.344 24.978,48 25.618,48C26.258,48 27.197,47.435 27.686,46.915L50.404,21.794C51.376,20.757 51.59,18.357 50.292,16.944C48.973,15.507 46.914,15.884 45.939,16.92Z" | ||
| android:fillColor="#000000" | ||
| android:fillType="evenOdd"/> | ||
| </group> | ||
| </vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="64dp" | ||
| android:height="64dp" | ||
| android:viewportWidth="64" | ||
| android:viewportHeight="64"> | ||
| <path | ||
| android:pathData="M42.381,44.858C42.341,44.818 42.431,44.898 42.381,44.858L27.581,31.778L42.381,18.948C44.03,17.308 43.731,15.248 42.381,13.848C42.341,13.798 42.431,13.888 42.381,13.848C40.871,12.418 38.521,12.498 36.951,13.868L19.061,29.368C17.591,30.648 17.711,32.798 19.061,34.188C19.131,34.248 36.951,49.878 36.951,49.878C38.861,51.788 41.071,51.408 42.381,50.128C43.691,48.848 44.121,46.558 42.381,44.858Z" | ||
| android:fillColor="#000000" | ||
| android:fillType="evenOdd"/> | ||
| </vector> |
14 changes: 14 additions & 0 deletions
14
theme-sosh/src/main/res/drawable/sosh_radio_button_selected.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="64dp" | ||
| android:height="64dp" | ||
| android:viewportWidth="64" | ||
| android:viewportHeight="64"> | ||
| <group> | ||
| <clip-path | ||
| android:pathData="M0.002,-0.008h64v64h-64z"/> | ||
| <path | ||
| android:pathData="M32.002,-0.008C49.602,-0.008 64.002,14.392 64.002,31.992C64.002,49.592 49.602,63.992 32.002,63.992C14.402,63.992 0.002,49.592 0.002,31.992C0.002,14.392 14.402,-0.008 32.002,-0.008ZM32.002,19.192C24.834,19.192 19.202,24.824 19.202,31.992C19.202,39.16 24.834,44.792 32.002,44.792C39.17,44.792 44.802,39.16 44.802,31.992C44.802,24.824 39.17,19.192 32.002,19.192Z" | ||
| android:fillColor="#000000" | ||
| android:fillType="evenOdd"/> | ||
| </group> | ||
| </vector> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.