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
ConstructorDescriptionDynamicLocaleDelegate
(AppCompatDelegate superDelegate, DynamicLocale dynamicLocale) Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
attachBaseContext2
(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.int
Get the super delegate used by this delegate.boolean
hasWindowFeature
(int featureId) void
void
boolean
void
onConfigurationChanged
(Configuration newConfig) void
void
void
onPostCreate
(Bundle savedInstanceState) void
void
onSaveInstanceState
(Bundle outState) void
onStart()
void
onStop()
boolean
requestWindowFeature
(int featureId) void
setContentView
(int resId) void
void
void
setHandleNativeActionModesEnabled
(boolean enabled) void
setLocalNightMode
(int mode) void
setSupportActionBar
(Toolbar toolbar) void
setTheme
(int themeResId) void
setTitle
(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:
getSupportActionBar
in classAppCompatDelegate
-
setSupportActionBar
- Specified by:
setSupportActionBar
in classAppCompatDelegate
-
getMenuInflater
- Specified by:
getMenuInflater
in classAppCompatDelegate
-
onCreate
- Specified by:
onCreate
in classAppCompatDelegate
-
onPostCreate
- Specified by:
onPostCreate
in classAppCompatDelegate
-
onConfigurationChanged
- Specified by:
onConfigurationChanged
in classAppCompatDelegate
-
onStart
public void onStart()- Specified by:
onStart
in classAppCompatDelegate
-
onStop
public void onStop()- Specified by:
onStop
in classAppCompatDelegate
-
onPostResume
public void onPostResume()- Specified by:
onPostResume
in classAppCompatDelegate
-
setTheme
- Overrides:
setTheme
in classAppCompatDelegate
-
findViewById
- Specified by:
findViewById
in classAppCompatDelegate
-
setContentView
- Specified by:
setContentView
in classAppCompatDelegate
-
setContentView
- Specified by:
setContentView
in classAppCompatDelegate
-
setContentView
- Specified by:
setContentView
in classAppCompatDelegate
-
addContentView
- Specified by:
addContentView
in classAppCompatDelegate
-
attachBaseContext2
- Overrides:
attachBaseContext2
in classAppCompatDelegate
-
setTitle
- Specified by:
setTitle
in classAppCompatDelegate
-
invalidateOptionsMenu
public void invalidateOptionsMenu()- Specified by:
invalidateOptionsMenu
in classAppCompatDelegate
-
onDestroy
public void onDestroy()- Specified by:
onDestroy
in classAppCompatDelegate
-
getDrawerToggleDelegate
- Specified by:
getDrawerToggleDelegate
in classAppCompatDelegate
-
requestWindowFeature
public boolean requestWindowFeature(int featureId) - Specified by:
requestWindowFeature
in classAppCompatDelegate
-
hasWindowFeature
public boolean hasWindowFeature(int featureId) - Specified by:
hasWindowFeature
in classAppCompatDelegate
-
startSupportActionMode
- Specified by:
startSupportActionMode
in classAppCompatDelegate
-
installViewFactory
public void installViewFactory()- Specified by:
installViewFactory
in classAppCompatDelegate
-
createView
public View createView(@Nullable View parent, String name, @NonNull Context context, @NonNull AttributeSet attrs) - Specified by:
createView
in classAppCompatDelegate
-
setHandleNativeActionModesEnabled
public void setHandleNativeActionModesEnabled(boolean enabled) - Specified by:
setHandleNativeActionModesEnabled
in classAppCompatDelegate
-
isHandleNativeActionModesEnabled
public boolean isHandleNativeActionModesEnabled()- Specified by:
isHandleNativeActionModesEnabled
in classAppCompatDelegate
-
onSaveInstanceState
- Specified by:
onSaveInstanceState
in classAppCompatDelegate
-
applyDayNight
public boolean applyDayNight()- Specified by:
applyDayNight
in classAppCompatDelegate
-
setLocalNightMode
- Specified by:
setLocalNightMode
in classAppCompatDelegate
-
getLocalNightMode
public int getLocalNightMode()- Overrides:
getLocalNightMode
in classAppCompatDelegate
-