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


Java PreferenceFragment类代码示例

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


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

示例1: init

import android.preference.PreferenceFragment; //导入依赖的package包/类
public static void init(final XSharedPreferences prefs, final ClassLoader classLoader) {
    try {
        final Class<?> classDevSettings = XposedHelpers.findClass(CLASS_DEV_SETTINGS, classLoader);

        if (DEBUG) log("hooking DeveloperSettings.onCreate method");
        XposedHelpers.findAndHookMethod(classDevSettings, "onCreate", Bundle.class, new XC_MethodHook() {
            @Override
            protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
                PreferenceFragment pf = (PreferenceFragment) param.thisObject;
                mResId = pf.getResources().getIdentifier("development_prefs", "xml", PACKAGE_NAME);
                if (DEBUG) log("mResId=" + mResId);
            }
        });
    }
    catch (Throwable t) {
        XposedBridge.log(t);
    }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:19,代码来源:MtkFixDevOptions.java

示例2: showFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
protected void showFragment(String tag, boolean addToBackStack) {
    PreferenceFragment fragment = (PreferenceFragment) getFragmentManager().findFragmentByTag(tag);
    if (fragment == null) {
        switch (tag) {
            case SettingsFragmentMaster.TAG:
            default:
                fragment = new SettingsFragmentMaster();
                toolbar.setTitle(R.string.settings);
                break;
        }
    }
    FragmentTransaction t = getFragmentManager().beginTransaction();
    if (addToBackStack) {
        t.addToBackStack(tag);
    }
    t.replace(R.id.settings__fragment_container, fragment, tag).commit();
}
 
开发者ID:LonamiWebs,项目名称:Stringlate,代码行数:18,代码来源:SettingsActivity.java

示例3: onCreate

import android.preference.PreferenceFragment; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    PreferenceFragment fragment = new MyPreferenceFragment();
    getFragmentManager().beginTransaction().replace(android.R.id.content, fragment).commit();
    getFragmentManager().executePendingTransactions();
    fragment.getPreferenceScreen().findPreference("a").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
        @Override
        public boolean onPreferenceClick(Preference preference) {
            Intent intent = new Intent(Preferences.this, IconPicker.class);
            startActivityForResult(intent, REQUEST_CODE);
            return true;
        }
    });

}
 
开发者ID:rhintersteininger,项目名称:open-wheels,代码行数:17,代码来源:Preferences.java

示例4: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || GeneralPreferenceFragment.class.getName().equals(fragmentName)
            || LocationPreferenceFragment.class.getName().equals(fragmentName)
            || SyncPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:etsy,项目名称:divertsy-client,代码行数:11,代码来源:SettingsActivity.java

示例5: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || GeneralPreferenceFragment.class.getName().equals(fragmentName)
            || PasswordPreferenceFragment.class.getName().equals(fragmentName)
            || DateOfBirthPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:jthomperoo,项目名称:Forge,代码行数:11,代码来源:Preferences.java

示例6: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || GeneralPreferenceFragment.class.getName().equals(fragmentName)
            || DataSyncPreferenceFragment.class.getName().equals(fragmentName)
            || NotificationPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:yrom,项目名称:shrinker,代码行数:11,代码来源:SettingsActivity.java

示例7: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
  return PreferenceFragment.class.getName().equals(fragmentName)
      || GeneralPreferenceFragment.class.getName().equals(fragmentName)
      || DataSyncPreferenceFragment.class.getName().equals(fragmentName)
      || NotificationPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:charlesng,项目名称:SampleAppArch,代码行数:11,代码来源:SettingsActivity.java

示例8: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName ().equals (fragmentName)
            || GeneralPreferenceFragment.class.getName ().equals (fragmentName)
            || DataSyncPreferenceFragment.class.getName ().equals (fragmentName)
            || NotificationPreferenceFragment.class.getName ().equals (fragmentName);
}
 
开发者ID:atulgpt,项目名称:TimeTrix,代码行数:11,代码来源:SettingsPreferenceActivity.java

示例9: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || GeneralPreferenceFragment.class.getName().equals(fragmentName)
            || DataSyncPreferenceFragment.class.getName().equals(fragmentName)
            || NotificationPreferenceFragment.class.getName().equals(fragmentName)
            || NamePreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:codingdojoangola,项目名称:cda-app,代码行数:12,代码来源:SettingsActivity.java

示例10: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || SipPreferenceFragment.class.getName().equals(fragmentName)
            || VideoPreferenceFragment.class.getName().equals(fragmentName)
            || AudioPreferenceFragment.class.getName().equals(fragmentName)
            || CommandsPreferenceFragment.class.getName().equals(fragmentName)
            || NotificationsPreferenceFragment.class.getName().equals(fragmentName)
            || AdvancedPreferenceFragment.class.getName().equals(fragmentName)
            || EchoCancellationPreferenceFragment.class.getName().equals(fragmentName)
            || SipAccountPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:d0pam1n,项目名称:DoorPhone,代码行数:12,代码来源:SettingsActivity.java

示例11: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || MqttPreferenceFragment.class.getName().equals(fragmentName)
            || BeaconPreferenceFragment.class.getName().equals(fragmentName)
            || GeneralPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:bjaanes,项目名称:BeaconMqtt,代码行数:11,代码来源:SettingsActivity.java

示例12: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || GeneralPreferenceFragment.class.getName().equals(fragmentName)
            || BacklightPreferenceFragment.class.getName().equals(fragmentName)
            || BluetoothPreferenceFragment.class.getName().equals(fragmentName)
            || DebugPreferenceFragment.class.getName().equals(fragmentName)
            || AboutFragment.class.getName().equals(fragmentName);
}
 
开发者ID:mmlevin,项目名称:C500Companion,代码行数:13,代码来源:SettingsActivity.java

示例13: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(@NonNull String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || UserPreferenceFragment.class.getName().equals(fragmentName)
            || NetworkPreferenceFragment.class.getName().equals(fragmentName)
            || NotificationPreferenceFragment.class.getName().equals(fragmentName)
            || ReloadPreferenceFragment.class.getName().equals(fragmentName)
            || OpenWeatherPreferenceFragment.class.getName().equals(fragmentName)
            || WirelessSocketPreferenceFragment.class.getName().equals(fragmentName)
            || CoinPreferenceFragment.class.getName().equals(fragmentName)
            || WirelessSwitchPreferenceFragment.class.getName().equals(fragmentName)
            || PositionPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:GuepardoApps,项目名称:LucaHome-AndroidApplication,代码行数:17,代码来源:SettingsActivity.java

示例14: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || ExperimentalPreferenceFragment.class.getName().equals(fragmentName)
            || DataSyncPreferenceFragment.class.getName().equals(fragmentName)
            || NotificationPreferenceFragment.class.getName().equals(fragmentName)
            || VersionPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:Chan4077,项目名称:StudyBuddy,代码行数:12,代码来源:SettingsActivity.java

示例15: isValidFragment

import android.preference.PreferenceFragment; //导入依赖的package包/类
/**
 * This method stops fragment injection in malicious applications.
 * Make sure to deny any unknown fragments here.
 */
protected boolean isValidFragment(String fragmentName) {
    return PreferenceFragment.class.getName().equals(fragmentName)
            || GeneralPreferenceFragment.class.getName().equals(fragmentName)
            //|| DataSyncPreferenceFragment.class.getName().equals(fragmentName)
            || NotificationPreferenceFragment.class.getName().equals(fragmentName);
}
 
开发者ID:pashkobohdan,项目名称:FastReading,代码行数:11,代码来源:SettingsActivity.java


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