本文整理了Java中android.support.v4.app.FragmentActivity.setTheme()
方法的一些代码示例,展示了FragmentActivity.setTheme()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FragmentActivity.setTheme()
方法的具体详情如下:
包路径:android.support.v4.app.FragmentActivity
类名称:FragmentActivity
方法名:setTheme
暂无
代码示例来源:origin: avjinder/Minimal-Todo
getActivity().setTheme(R.style.CustomStyle_LightTheme);
} else {
getActivity().setTheme(R.style.CustomStyle_DarkTheme);
代码示例来源:origin: avjinder/Minimal-Todo
getActivity().setTheme(R.style.CustomStyle_LightTheme);
Log.d("OskarSchindler", "Light Theme");
} else {
getActivity().setTheme(R.style.CustomStyle_DarkTheme);
代码示例来源:origin: avjinder/Minimal-Todo
mTheme = R.style.CustomStyle_DarkTheme;
this.getActivity().setTheme(mTheme);
代码示例来源:origin: ManbangGroup/Phantom
@Override
public void setTheme(int themeId) {
super.setTheme(themeId);
if (mHostThemeId == -1) {
mHostThemeId = themeId;
}
}
代码示例来源:origin: nekocode/JarFilterPlugin
@Override
public void setTheme(@StyleRes final int resid) {
super.setTheme(resid);
// Keep hold of the theme id so that we can re-set it later if needed
mThemeId = resid;
}
代码示例来源:origin: byhieg/easyweather
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
getActivity().setTheme(R.style.DayTheme);
if (MyApplication.nightMode2()) {
initNightView(R.layout.night_mode_overlay);
}
view = inflater.inflate(R.layout.fragment_laboratory, null);
initView();
return view;
}
代码示例来源:origin: byhieg/easyweather
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
getActivity().setTheme(R.style.DayTheme);
if (MyApplication.nightMode2()) {
initNightView(R.layout.night_mode_overlay);
}
return inflater.inflate(R.layout.fragment_help, container, false);
}
代码示例来源:origin: byhieg/easyweather
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
getActivity().setTheme(R.style.DayTheme);
if (MyApplication.nightMode2()) {
initNightView(R.layout.night_mode_overlay);
}
View view = inflater.inflate(R.layout.fragment_future, container, false);
ButterKnife.bind(this, view);
mPresenter.start();
return view;
}
代码示例来源:origin: byhieg/easyweather
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
getActivity().setTheme(R.style.DayTheme);
if (MyApplication.nightMode2()) {
initNightView(R.layout.night_mode_overlay);
}
View view = inflater.inflate(R.layout.fragment_setting, container, false);
initView(view);
return view;
}
代码示例来源:origin: byhieg/easyweather
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
getActivity().setTheme(R.style.DayTheme);
if (MyApplication.nightMode2()) {
initNightView(R.layout.night_mode_overlay);
}
View view = inflater.inflate(R.layout.fragment_about, container, false);
TextView tv = (TextView) view.findViewById(R.id.link);
String textStr = "https://github.com/byhieg/easyweather";
tv.setAutoLinkMask(Linkify.WEB_URLS);
tv.setText(textStr);
Spannable s = (Spannable) tv.getText();
s.setSpan(new UnderlineSpan() {
@Override
public void updateDrawState(TextPaint ds) {
ds.setColor(ds.linkColor);
ds.setUnderlineText(false);
}
}, 0, textStr.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return view;
}
代码示例来源:origin: byhieg/easyweather
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
getActivity().setTheme(R.style.DayTheme);
if (MyApplication.nightMode2()) {
initNightView(R.layout.night_mode_overlay);
}
View view = inflater.inflate(R.layout.fragment_wiki, container, false);
initData();
initView(view);
return view;
}
代码示例来源:origin: byhieg/easyweather
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
getActivity().setTheme(R.style.DayTheme);
if (MyApplication.nightMode2()) {
initNightView(R.layout.night_mode_overlay);
}
View view = inflater.inflate(R.layout.fragment_share, container, false);
files[0] = new File(MyApplication.getAppContext().getExternalFilesDir(null),
"IMG-BRIEF" + ".png");
files[1] = new File(MyApplication.getAppContext().getExternalFilesDir(null),
"IMG-DETAIL" + ".png");
files[2] = new File(MyApplication.getAppContext().getExternalFilesDir(null),
"IMG-FUTURE" + ".png");
initView(view);
return view;
}
内容来源于网络,如有侵权,请联系作者删除!