本文整理了Java中android.app.Dialog.getActionBar()
方法的一些代码示例,展示了Dialog.getActionBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialog.getActionBar()
方法的具体详情如下:
包路径:android.app.Dialog
类名称:Dialog
方法名:getActionBar
暂无
代码示例来源:origin: stackoverflow.com
dialog.getActionBar().setDisplayHomeAsUpEnabled(true);
代码示例来源:origin: stackoverflow.com
dialog.getActionBar().setDisplayHomeAsUpEnabled(true);
代码示例来源:origin: wasdennnoch/AndroidN-ify
@SuppressWarnings({"ConstantConditions", "deprecation"})
public static void applyTheme(Dialog dialog, Context context, SharedPreferences prefs) {
if (prefs.getString("app_theme", "light").equals("device")) return;
int colorPrimary = prefs.getInt("theme_colorPrimary", context.getResources().getColor(R.color.colorPrimary));
float[] hsv = new float[3];
Color.colorToHSV(colorPrimary, hsv);
hsv[2] *= 0.8f;
int colorPrimaryDark = Color.HSVToColor(hsv);
dialog.getWindow().setStatusBarColor(colorPrimaryDark);
try {
dialog.getActionBar().setBackgroundDrawable(new ColorDrawable(colorPrimary));
} catch (NullPointerException ignore) {
}
}
代码示例来源:origin: billthefarmer/currency
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
Preference preference)
{
boolean result =
super.onPreferenceTreeClick(preferenceScreen, preference);
// Set home as up
if (preference instanceof PreferenceScreen)
{
Dialog dialog = ((PreferenceScreen) preference).getDialog();
ActionBar actionBar = dialog.getActionBar();
actionBar.setDisplayHomeAsUpEnabled(false);
}
return result;
}
代码示例来源:origin: billthefarmer/tuner
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
Preference preference)
{
boolean result =
super.onPreferenceTreeClick(preferenceScreen, preference);
if (preference instanceof PreferenceScreen)
{
Dialog dialog = ((PreferenceScreen) preference).getDialog();
ActionBar actionBar = dialog.getActionBar();
actionBar.setDisplayHomeAsUpEnabled(false);
}
return result;
}
代码示例来源:origin: billthefarmer/scope
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
Preference preference)
{
boolean result =
super.onPreferenceTreeClick(preferenceScreen, preference);
if (preference instanceof PreferenceScreen)
{
Dialog dialog = ((PreferenceScreen) preference).getDialog();
ActionBar actionBar = dialog.getActionBar();
actionBar.setDisplayHomeAsUpEnabled(false);
}
return result;
}
代码示例来源:origin: billthefarmer/diary
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
Preference preference)
{
boolean result =
super.onPreferenceTreeClick(preferenceScreen, preference);
// Set home as up
if (preference instanceof PreferenceScreen)
{
Dialog dialog = ((PreferenceScreen) preference).getDialog();
ActionBar actionBar = dialog.getActionBar();
actionBar.setDisplayHomeAsUpEnabled(false);
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!