android.support.v4.app.FragmentActivity.setTheme()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(98)

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

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;
}

相关文章

微信公众号

最新文章

更多

FragmentActivity类方法