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
dependencyResolutionManagement { | |
versionCatalogs { | |
create("libs") { | |
version() | |
library() | |
bundle() | |
plugin() | |
} | |
} | |
} |
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
[versions] | |
[libraries] | |
[bundles] | |
[plugins] |
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
dependencies { | |
implementation("my.spectacular:library:1.2.3") | |
} |
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
dependencies { | |
implementation(Libraries.mySpectacular) | |
} |
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
object Versions { | |
const val mySpectacularLibararyVersion = "1.2.3" | |
} | |
object Libraries { | |
const val val mySpectacular = | |
"my.spectacular:library:${Versions.mySpectacularLibararyVersion}" | |
} |
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
res/ | |
values/ | |
strings.xml | |
values-en-neuter/ | |
strings.xml | |
values-en-masculine/ | |
strings.xml | |
values-en-feminine/ | |
strings.xml | |
values-fr-neuter/ |
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
// Get GrammaticalInflectionManager system service | |
val grammaticalInflectionManager = context.getSystemService(GrammaticalInflectionManager::class.java) | |
/** | |
* Use service to get inflection of the app | |
* Will be one of | |
* Configuration.GRAMMATICAL_GENDER_NEUTRAL | |
* Configuration.GRAMMATICAL_GENDER_FEMININE | |
* Configuration.GRAMMATICAL_GENDER_MASCULINE | |
*/ |
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
// Get GrammaticalInflectionManager system service | |
val grammaticalInflectionManager = context.getSystemService(GrammaticalInflectionManager::class.java) | |
/** | |
* Use service to change the inflection of the app | |
* Options are | |
* Configuration.GRAMMATICAL_GENDER_NEUTRAL | |
* Configuration.GRAMMATICAL_GENDER_FEMININE | |
* Configuration.GRAMMATICAL_GENDER_MASCULINE | |
*/ |
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
val customActionOne = ChooserAction.Builder( | |
Icon.createWithResource(applicationContext, R.drawable.outline_android), | |
getString(R.string.app_name), | |
PendingIntent.getActivity( | |
applicationContext, | |
/* Request code for the pending intent */ REQUEST_CODE, | |
/* Intent for the custom action */ intent, | |
PendingIntent.FLAG_IMMUTABLE | |
) | |
).build() |
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
/** | |
* More information at https://developer.android.com/reference/androidx/core/text/util/LocalePreferences | |
*/ | |
// Calendar Type | |
LocalePreferences.getCalendarType() | |
// First day of the week | |
LocalePreferences.getFirstDayOfWeek() |