android.support.v7.app.AppCompatDelegate类的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(158)

本文整理了Java中android.support.v7.app.AppCompatDelegate类的一些代码示例,展示了AppCompatDelegate类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppCompatDelegate类的具体详情如下:
包路径:android.support.v7.app.AppCompatDelegate
类名称:AppCompatDelegate

AppCompatDelegate介绍

暂无

代码示例

代码示例来源:origin: k9mail/k-9

private AppCompatDelegate getDelegate() {
    if (mDelegate == null) {
      mDelegate = AppCompatDelegate.create(this, null);
    }
    return mDelegate;
  }
}

代码示例来源:origin: north2016/T-MVP

@Override
protected void onCreate(Bundle savedInstanceState) {
  getDelegate().installViewFactory();
  getDelegate().onCreate(savedInstanceState);
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_setting);
  setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
  addPreferencesFromResource(R.xml.settings);
  Toolbar toolbar = (Toolbar) this.findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  mDelegate.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}

代码示例来源:origin: rey5137/material

@Override
public void onAnimationEnd(Animation animation) {
  if(mAppCompatDelegate != null)
    mAppCompatDelegate.invalidateOptionsMenu();
  else
    onPrepareMenu();
}

代码示例来源:origin: k9mail/k-9

@Override
protected void onCreate(Bundle savedInstanceState) {
  getDelegate().installViewFactory();
  getDelegate().onCreate(savedInstanceState);
  super.onCreate(savedInstanceState);
}

代码示例来源:origin: seven332/EhViewer

@Override
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
  super.onPostCreate(savedInstanceState);
  getDelegate().onPostCreate(savedInstanceState);
}

代码示例来源:origin: k9mail/k-9

@Override
protected void onPostResume() {
  super.onPostResume();
  getDelegate().onPostResume();
}

代码示例来源:origin: k9mail/k-9

@Override
protected void onStop() {
  super.onStop();
  getDelegate().onStop();
}

代码示例来源:origin: k9mail/k-9

@Override
protected void onDestroy() {
  super.onDestroy();
  getDelegate().onDestroy();
}

代码示例来源:origin: k9mail/k-9

@Override
public void setContentView(View view) {
  getDelegate().setContentView(view);
}

代码示例来源:origin: seven332/EhViewer

/**
 * Support library version of {@link android.app.Activity#getActionBar}.
 *
 * <p>Retrieve a reference to this activity's ActionBar.
 *
 * @return The Activity's ActionBar, or null if it does not have one.
 */
@Nullable
public ActionBar getSupportActionBar() {
  return getDelegate().getSupportActionBar();
}

代码示例来源:origin: seven332/EhViewer

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
  getDelegate().installViewFactory();
  getDelegate().onCreate(savedInstanceState);
  super.onCreate(savedInstanceState);
}

代码示例来源:origin: k9mail/k-9

@Override
protected void onPostCreate(Bundle savedInstanceState) {
  super.onPostCreate(savedInstanceState);
  getDelegate().onPostCreate(savedInstanceState);
}

代码示例来源:origin: seven332/EhViewer

@Override
protected void onPostResume() {
  super.onPostResume();
  getDelegate().onPostResume();
}

代码示例来源:origin: seven332/EhViewer

@Override
protected void onStop() {
  super.onStop();
  getDelegate().onStop();
}

代码示例来源:origin: seven332/EhViewer

@Override
protected void onDestroy() {
  super.onDestroy();
  getDelegate().onDestroy();
}

代码示例来源:origin: k9mail/k-9

@Override
public void setContentView(@LayoutRes int layoutResID) {
  getDelegate().setContentView(layoutResID);
}

代码示例来源:origin: k9mail/k-9

public ActionBar getSupportActionBar() {
  return getDelegate().getSupportActionBar();
}

代码示例来源:origin: JZ-Darkal/AndroidHttpCapture

@Override
protected void onCreate(Bundle savedInstanceState) {
  getDelegate().installViewFactory();
  getDelegate().onCreate(savedInstanceState);
  super.onCreate(savedInstanceState);
}

代码示例来源:origin: JZ-Darkal/AndroidHttpCapture

private AppCompatDelegate getDelegate() {
    if (mDelegate == null) {
      mDelegate = AppCompatDelegate.create(this, null);
    }
    return mDelegate;
  }
}

代码示例来源:origin: seven332/EhViewer

@Override
public void invalidateOptionsMenu() {
  getDelegate().invalidateOptionsMenu();
}

相关文章