Java Code Examples for android.support.v7.app.AppCompatDelegate.applyDayNight()

The following are Jave code examples for showing how to use applyDayNight() of the android.support.v7.app.AppCompatDelegate class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: QuotesOnDesign   File: ActivityAppCompatPreference.java   Source Code and License Vote up 5 votes
@Override
protected void onCreate( Bundle savedInstanceState )
{
  final AppCompatDelegate delegate = getDelegate();
  delegate.installViewFactory();
  delegate.onCreate( savedInstanceState );
  if ( delegate.applyDayNight() && (themeId != 0) )
  {
    onApplyThemeResource( getTheme(), themeId, false );
  }
  super.onCreate( savedInstanceState );
}