當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。