Package androidx.appcompat.app
Class DynamicLocaleDelegate
java.lang.Object
androidx.appcompat.app.AppCompatDelegate
androidx.appcompat.app.DynamicLocaleDelegate
An
AppCompatDelegate to properly apply the locale configurations.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class androidx.appcompat.app.AppCompatDelegate
AppCompatDelegate.NightMode -
Field Summary
Fields inherited from class androidx.appcompat.app.AppCompatDelegate
FEATURE_ACTION_MODE_OVERLAY, FEATURE_SUPPORT_ACTION_BAR, FEATURE_SUPPORT_ACTION_BAR_OVERLAY, MODE_NIGHT_AUTO, MODE_NIGHT_AUTO_BATTERY, MODE_NIGHT_AUTO_TIME, MODE_NIGHT_FOLLOW_SYSTEM, MODE_NIGHT_NO, MODE_NIGHT_UNSPECIFIED, MODE_NIGHT_YES -
Constructor Summary
ConstructorsConstructorDescriptionDynamicLocaleDelegate(AppCompatDelegate superDelegate, DynamicLocale dynamicLocale) Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanattachBaseContext2(Context context) createView(View parent, String name, Context context, AttributeSet attrs) <T extends View>
TfindViewById(int id) Get the dynamic locale used by this delegate.intGet the super delegate used by this delegate.booleanhasWindowFeature(int featureId) voidvoidbooleanvoidonConfigurationChanged(Configuration newConfig) voidvoidvoidonPostCreate(Bundle savedInstanceState) voidvoidonSaveInstanceState(Bundle outState) voidonStart()voidonStop()booleanrequestWindowFeature(int featureId) voidsetContentView(int resId) voidvoidvoidsetHandleNativeActionModesEnabled(boolean enabled) voidsetLocalNightMode(int mode) voidsetSupportActionBar(Toolbar toolbar) voidsetTheme(int themeResId) voidsetTitle(CharSequence title) startSupportActionMode(ActionMode.Callback callback) wrapBaseContext(Context context) Wrap the base context if required.Methods inherited from class androidx.appcompat.app.AppCompatDelegate
attachBaseContext, create, create, create, create, getApplicationLocales, getContextForDelegate, getDefaultNightMode, isCompatVectorFromResourcesEnabled, setApplicationLocales, setCompatVectorFromResourcesEnabled, setDefaultNightMode, setOnBackInvokedDispatcher
-
Constructor Details
-
Method Details
-
getSuperDelegate
Get the super delegate used by this delegate.- Returns:
- The super delegate used by this delegate.
-
getDynamicLocale
Get the dynamic locale used by this delegate.- Returns:
- The dynamic locale used by this delegate.
-
wrapBaseContext
Wrap the base context if required.- Parameters:
context- The base context to be wrapped.- Returns:
- The wrapped base context.
-
getSupportActionBar
- Specified by:
getSupportActionBarin classAppCompatDelegate
-
setSupportActionBar
- Specified by:
setSupportActionBarin classAppCompatDelegate
-
getMenuInflater
- Specified by:
getMenuInflaterin classAppCompatDelegate
-
onCreate
- Specified by:
onCreatein classAppCompatDelegate
-
onPostCreate
- Specified by:
onPostCreatein classAppCompatDelegate
-
onConfigurationChanged
- Specified by:
onConfigurationChangedin classAppCompatDelegate
-
onStart
public void onStart()- Specified by:
onStartin classAppCompatDelegate
-
onStop
public void onStop()- Specified by:
onStopin classAppCompatDelegate
-
onPostResume
public void onPostResume()- Specified by:
onPostResumein classAppCompatDelegate
-
setTheme
- Overrides:
setThemein classAppCompatDelegate
-
findViewById
- Specified by:
findViewByIdin classAppCompatDelegate
-
setContentView
- Specified by:
setContentViewin classAppCompatDelegate
-
setContentView
- Specified by:
setContentViewin classAppCompatDelegate
-
setContentView
- Specified by:
setContentViewin classAppCompatDelegate
-
addContentView
- Specified by:
addContentViewin classAppCompatDelegate
-
attachBaseContext2
- Overrides:
attachBaseContext2in classAppCompatDelegate
-
setTitle
- Specified by:
setTitlein classAppCompatDelegate
-
invalidateOptionsMenu
public void invalidateOptionsMenu()- Specified by:
invalidateOptionsMenuin classAppCompatDelegate
-
onDestroy
public void onDestroy()- Specified by:
onDestroyin classAppCompatDelegate
-
getDrawerToggleDelegate
- Specified by:
getDrawerToggleDelegatein classAppCompatDelegate
-
requestWindowFeature
public boolean requestWindowFeature(int featureId) - Specified by:
requestWindowFeaturein classAppCompatDelegate
-
hasWindowFeature
public boolean hasWindowFeature(int featureId) - Specified by:
hasWindowFeaturein classAppCompatDelegate
-
startSupportActionMode
- Specified by:
startSupportActionModein classAppCompatDelegate
-
installViewFactory
public void installViewFactory()- Specified by:
installViewFactoryin classAppCompatDelegate
-
createView
public View createView(@Nullable View parent, String name, @NonNull Context context, @NonNull AttributeSet attrs) - Specified by:
createViewin classAppCompatDelegate
-
setHandleNativeActionModesEnabled
public void setHandleNativeActionModesEnabled(boolean enabled) - Specified by:
setHandleNativeActionModesEnabledin classAppCompatDelegate
-
isHandleNativeActionModesEnabled
public boolean isHandleNativeActionModesEnabled()- Specified by:
isHandleNativeActionModesEnabledin classAppCompatDelegate
-
onSaveInstanceState
- Specified by:
onSaveInstanceStatein classAppCompatDelegate
-
applyDayNight
public boolean applyDayNight()- Specified by:
applyDayNightin classAppCompatDelegate
-
setLocalNightMode
- Specified by:
setLocalNightModein classAppCompatDelegate
-
getLocalNightMode
public int getLocalNightMode()- Overrides:
getLocalNightModein classAppCompatDelegate
-