当前位置: 首页>>代码示例>>Java>>正文


Java PreferenceFragmentCompat类代码示例

本文整理汇总了Java中com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat的典型用法代码示例。如果您正苦于以下问题:Java PreferenceFragmentCompat类的具体用法?Java PreferenceFragmentCompat怎么用?Java PreferenceFragmentCompat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PreferenceFragmentCompat类属于com.takisoft.fix.support.v7.preference包,在下文中一共展示了PreferenceFragmentCompat类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getFragment

import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat; //导入依赖的package包/类
private <F extends PreferenceFragmentCompat> F getFragment(String fragment)
{
    if (fragment != null) {
        if (fragment.equals(AppearanceSettingsFragment.class.getSimpleName())) {
            return (F) AppearanceSettingsFragment.newInstance();
        } else if (fragment.equals(BehaviorSettingsFragment.class.getSimpleName())) {
            return (F) BehaviorSettingsFragment.newInstance();
        } else if (fragment.equals(StorageSettingsFragment.class.getSimpleName())) {
            return (F) StorageSettingsFragment.newInstance();
        } else if (fragment.equals(LimitationsSettingsFragment.class.getSimpleName())) {
            return (F) LimitationsSettingsFragment.newInstance();
        } else if (fragment.equals(NetworkSettingsFragment.class.getSimpleName())) {
            return (F) NetworkSettingsFragment.newInstance();
        } else if (fragment.equals(ProxySettingsFragment.class.getSimpleName())) {
            return (F) ProxySettingsFragment.newInstance();
        } else {
            return null;
        }
    }

    return null;
}
 
开发者ID:proninyaroslav,项目名称:libretorrent,代码行数:23,代码来源:BasePreferenceActivity.java

示例2: setFragment

import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat; //导入依赖的package包/类
private <F extends PreferenceFragmentCompat> void setFragment(F fragment, String title)
{
    if (Utils.isTablet(getActivity().getApplicationContext())) {
        if (callback != null) {
            callback.onDetailTitleChanged(title);
        }

        getActivity().getSupportFragmentManager().beginTransaction()
                .replace(R.id.detail_fragment_container, fragment)
                .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
                .commit();
    }
}
 
开发者ID:proninyaroslav,项目名称:libretorrent,代码行数:14,代码来源:SettingsFragment.java

示例3: startActivity

import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat; //导入依赖的package包/类
private <F extends PreferenceFragmentCompat> void startActivity(Class<F> fragment, String title)
{
    Intent i = new Intent(getActivity(), BasePreferenceActivity.class);
    PreferenceActivityConfig config = new PreferenceActivityConfig(
            fragment.getSimpleName(),
            title);

    i.putExtra(BasePreferenceActivity.TAG_CONFIG, config);
    startActivity(i);
}
 
开发者ID:proninyaroslav,项目名称:libretorrent,代码行数:11,代码来源:SettingsFragment.java

示例4: setFragment

import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat; //导入依赖的package包/类
public <F extends PreferenceFragmentCompat> void setFragment(F fragment)
{
    if (fragment == null) {
        return;
    }

    getSupportFragmentManager().beginTransaction()
            .replace(R.id.fragment_container, fragment).commit();
}
 
开发者ID:proninyaroslav,项目名称:libretorrent,代码行数:10,代码来源:BasePreferenceActivity.java

示例5: onPreferenceClick

import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat; //导入依赖的package包/类
@Override
public void onPreferenceClick(@NonNull PreferenceFragmentCompat fragment, @NonNull Preference preference) {
    Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
    intent.setType("*/*");
    intent.addCategory(Intent.CATEGORY_OPENABLE);

    fragment.startActivityForResult(intent, RC_GET_CONTENT);
}
 
开发者ID:Gericop,项目名称:Android-Support-Preference-V7-Fix,代码行数:9,代码来源:ActivityResultTestPreference.java

示例6: onPreferenceStartScreen

import com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat; //导入依赖的package包/类
@Override
public boolean onPreferenceStartScreen(android.support.v7.preference.PreferenceFragmentCompat preferenceFragmentCompat, PreferenceScreen preferenceScreen) {
	return false;
}
 
开发者ID:Calsign,项目名称:APDE,代码行数:5,代码来源:SettingsActivity.java


注:本文中的com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。