GrammaticalInflectionManagerCompat
public final class GrammaticalInflectionManagerCompat
Helper for accessing features in android.app.GrammaticalInflectionManager.
Summary
Constants |
|
|---|---|
static final int |
Constant for grammatical gender: to indicate the terms of address the user preferred in an application is feminine. |
static final int |
Constant for grammatical gender: to indicate the terms of address the user preferred in an application is masculine. |
static final int |
Constant for grammatical gender: to indicate the terms of address the user preferred in an application is neuter. |
static final int |
Constant for grammatical gender: to indicate the user has not specified the terms of address for the application. |
Public methods |
|
|---|---|
static int |
Returns the current grammatical gender. |
static void |
@AnyThreadSets the current grammatical gender. |
Constants
GRAMMATICAL_GENDER_FEMININE
public static final int GRAMMATICAL_GENDER_FEMININE = 2
Constant for grammatical gender: to indicate the terms of address the user preferred in an application is feminine.
| See also | |
|---|---|
GRAMMATICAL_GENDER_FEMININE |
GRAMMATICAL_GENDER_MASCULINE
public static final int GRAMMATICAL_GENDER_MASCULINE = 3
Constant for grammatical gender: to indicate the terms of address the user preferred in an application is masculine.
| See also | |
|---|---|
GRAMMATICAL_GENDER_MASCULINE |
GRAMMATICAL_GENDER_NEUTRAL
public static final int GRAMMATICAL_GENDER_NEUTRAL = 1
Constant for grammatical gender: to indicate the terms of address the user preferred in an application is neuter.
| See also | |
|---|---|
GRAMMATICAL_GENDER_NEUTRAL |
GRAMMATICAL_GENDER_NOT_SPECIFIED
public static final int GRAMMATICAL_GENDER_NOT_SPECIFIED = 0
Constant for grammatical gender: to indicate the user has not specified the terms of address for the application.
| See also | |
|---|---|
GRAMMATICAL_GENDER_NOT_SPECIFIED |
Public methods
getApplicationGrammaticalGender
@AnyThread
public static int getApplicationGrammaticalGender(@NonNull Context context)
Returns the current grammatical gender. No-op on versions prior to UPSIDE_DOWN_CAKE.
| Returns | |
|---|---|
int |
the grammatical gender if device API level is greater than 33, otherwise, return 0. |
setRequestedApplicationGrammaticalGender
@AnyThread
public static void setRequestedApplicationGrammaticalGender(
@NonNull Context context,
int grammaticalGender
)
Sets the current grammatical gender. No-op on versions prior to UPSIDE_DOWN_CAKE.