GrammaticalInflectionManagerCompat


class GrammaticalInflectionManagerCompat


Helper for accessing features in android.app.GrammaticalInflectionManager.

Summary

Constants

const Int

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is feminine.

const Int

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is masculine.

const Int

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is neuter.

const Int

Constant for grammatical gender: to indicate the user has not specified the terms of address for the application.

Public functions

java-static Int

Returns the current grammatical gender.

java-static Unit
@AnyThread
setRequestedApplicationGrammaticalGender(
    context: Context,
    grammaticalGender: Int
)

Sets the current grammatical gender.

Constants

GRAMMATICAL_GENDER_FEMININE

Added in 1.12.0
const val GRAMMATICAL_GENDER_FEMININE = 2: Int

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is feminine.

GRAMMATICAL_GENDER_MASCULINE

Added in 1.12.0
const val GRAMMATICAL_GENDER_MASCULINE = 3: Int

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is masculine.

GRAMMATICAL_GENDER_NEUTRAL

Added in 1.12.0
const val GRAMMATICAL_GENDER_NEUTRAL = 1: Int

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is neuter.

GRAMMATICAL_GENDER_NOT_SPECIFIED

Added in 1.12.0
const val GRAMMATICAL_GENDER_NOT_SPECIFIED = 0: Int

Constant for grammatical gender: to indicate the user has not specified the terms of address for the application.

Public functions

getApplicationGrammaticalGender

Added in 1.12.0
@AnyThread
java-static fun getApplicationGrammaticalGender(context: Context): Int

Returns the current grammatical gender. No-op on versions prior to UPSIDE_DOWN_CAKE.

Parameters
context: Context

Context to retrieve service from.

Returns
Int

the grammatical gender if device API level is greater than 33, otherwise, return 0.

setRequestedApplicationGrammaticalGender

Added in 1.12.0
@AnyThread
java-static fun setRequestedApplicationGrammaticalGender(
    context: Context,
    grammaticalGender: Int
): Unit

Sets the current grammatical gender. No-op on versions prior to UPSIDE_DOWN_CAKE.

Parameters
context: Context

Context to retrieve service from.

grammaticalGender: Int

the terms of address the user preferred in an application.