本文整理汇总了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;
}
示例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();
}
}
示例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);
}
示例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();
}
示例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);
}
示例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;
}