added in version 24.1.0
belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1

AppCompatDelegate

public abstract class AppCompatDelegate
extends Object

java.lang.Object
   ↳ android.support.v7.app.AppCompatDelegate


This class represents a delegate which you can use to extend AppCompat's support to any Activity.

When using an AppCompatDelegate, you should call the following methods instead of the Activity method of the same name:

The following methods should be called from the Activity method of the same name:

An Activity can only be linked with one AppCompatDelegate instance, therefore the instance returned from create(Activity, AppCompatCallback) should be retained until the Activity is destroyed.

Summary

Constants

int FEATURE_ACTION_MODE_OVERLAY

Flag for specifying the behavior of action modes when an Action Bar is not present.

int FEATURE_SUPPORT_ACTION_BAR

Flag for enabling the support Action Bar.

int FEATURE_SUPPORT_ACTION_BAR_OVERLAY

Flag for requesting an support Action Bar that overlays window content.

int MODE_NIGHT_AUTO

Mode which means to use night mode when it is determined that it is night or not.

int MODE_NIGHT_FOLLOW_SYSTEM

Mode which uses the system's night mode setting to determine if it is night or not.

int MODE_NIGHT_NO

Mode which means to not use night mode, and therefore prefer notnight qualified resources where available, regardless of the time.

int MODE_NIGHT_YES

Mode which means to always use night mode, and therefore prefer night qualified resources where available, regardless of the time.

Public methods

abstract void addContentView(View v, ViewGroup.LayoutParams lp)

Should be called instead of addContentView(android.view.View, android.view.ViewGroup.LayoutParams)}

abstract boolean applyDayNight()

Allow AppCompat to apply the night and notnight resource qualifiers.

static