com.grarak.kerneladiutor.fragments.tools.ProfileFragment Java Examples
The following examples show how to use
com.grarak.kerneladiutor.fragments.tools.ProfileFragment.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AddProfileActivity.java From KA27 with Apache License 2.0 | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); BundleScrubber.scrub(getIntent()); Bundle localeBundle = getIntent().getBundleExtra(EXTRA_BUNDLE); BundleScrubber.scrub(localeBundle); ActionBar actionBar; if ((actionBar = getSupportActionBar()) != null) { actionBar.setTitle(getString(R.string.profile)); if (PluginBundleManager.isBundleValid(localeBundle)) { String message; if ((message = localeBundle.getString(PluginBundleManager.BUNDLE_EXTRA_STRING_MESSAGE)) != null) actionBar.setSubtitle(message.split(DIVIDER)[0]); } } setFragment(R.id.content_frame, ProfileFragment.newInstance()); }
Example #2
Source File: AddProfileActivity.java From kernel_adiutor with Apache License 2.0 | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); BundleScrubber.scrub(getIntent()); Bundle localeBundle = getIntent().getBundleExtra(EXTRA_BUNDLE); BundleScrubber.scrub(localeBundle); ActionBar actionBar; if ((actionBar = getSupportActionBar()) != null) { actionBar.setTitle(getString(R.string.profile)); if (PluginBundleManager.isBundleValid(localeBundle)) { String message; if ((message = localeBundle.getString(PluginBundleManager.BUNDLE_EXTRA_STRING_MESSAGE)) != null) actionBar.setSubtitle(message.split(DIVIDER)[0]); } } setFragment(R.id.content_frame, ProfileFragment.newInstance()); }
Example #3
Source File: MainActivity.java From KA27 with Apache License 2.0 | 5 votes |
/** * Add all fragments in a list */ private void setList() { ITEMS.clear(); ITEMS.add(new DAdapter.MainHeader()); ITEMS.add(new DAdapter.Header(getString(R.string.information))); ITEMS.add(new DAdapter.Item(getString(R.string.kernel_information), new KernelInformationFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.frequency_table), new FrequencyTableFragment())); ITEMS.add(new DAdapter.Header(getString(R.string.kernel))); ITEMS.add(new DAdapter.Item(getString(R.string.cpu), new CPUFragment())); if (CPUHotplug.hasCpuHotplug()) ITEMS.add(new DAdapter.Item(getString(R.string.cpu_hotplug), new CPUHotplugFragment())); if (CPUVoltage.hasCpuVoltage()) ITEMS.add(new DAdapter.Item(getString(R.string.cpu_voltage), new CPUVoltageFragment())); if (Entropy.hasEntropy()) ITEMS.add(new DAdapter.Item(getString(R.string.entropy), new EntropyFragment())); if (GPU.hasGpuControl()) ITEMS.add(new DAdapter.Item(getString(R.string.gpu), new GPUFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.io_scheduler), new IOFragment())); if (KSM.hasKsm()) ITEMS.add(new DAdapter.Item(getString(R.string.ksm), new KSMFragment())); if (LMK.getMinFrees() != null) ITEMS.add(new DAdapter.Item(getString(R.string.low_memory_killer), new LMKFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.misc_controls), new MiscFragment())); if (!Utils.isTV(this)) ITEMS.add(new DAdapter.Item(getString(R.string.battery), new BatteryFragment())); //Power and battery if (Ram.hasRamControl()) ITEMS.add(new DAdapter.Item(getString(R.string.ram), new RamFragment())); if (Screen.hasScreen()) ITEMS.add(new DAdapter.Item(getString(R.string.screen), new ScreenFragment())); if (Sound.hasSound()) ITEMS.add(new DAdapter.Item(getString(R.string.sound), new SoundFragment())); if (Thermal.hasThermal()) ITEMS.add(new DAdapter.Item(getString(R.string.thermal), new ThermalFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.virtual_memory), new VMFragment())); if (Wake.hasWake()) ITEMS.add(new DAdapter.Item(getString(R.string.wake_controls), new WakeFragment())); if (WakeLock.hasAnyWakelocks()) ITEMS.add(new DAdapter.Item(getString(R.string.wakelocks), new WakeLockFragment())); ITEMS.add(new DAdapter.Header(getString(R.string.tools))); if (Backup.hasBackup()) ITEMS.add(new DAdapter.Item(getString(R.string.backup), new BackupFragment())); if (Buildprop.hasBuildprop()) ITEMS.add(new DAdapter.Item(getString(R.string.build_prop_editor), new BuildpropFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.initd), new InitdFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.logs), new LogsFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.profile), new ProfileFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.recovery), new RecoveryFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.startup_commands), new StartUpCommandsFragment())); ITEMS.add(new DAdapter.Header(getString(R.string.other))); ITEMS.add(new DAdapter.Item(getString(R.string.settings), new SettingsFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.about_us), new AboutusFragment())); }
Example #4
Source File: ProfileTaskerActivity.java From KernelAdiutor with GNU General Public License v3.0 | 5 votes |
private Fragment getFragment() { Fragment fragment = getSupportFragmentManager().findFragmentByTag("create_fragment"); if (fragment == null) { return ProfileFragment.newInstance(true); } return fragment; }
Example #5
Source File: MainActivity.java From kernel_adiutor with Apache License 2.0 | 4 votes |
/** * Add all fragments in a list */ private void setList() { ITEMS.clear(); ITEMS.add(new DAdapter.MainHeader()); ITEMS.add(new DAdapter.Header(getString(R.string.information))); ITEMS.add(new DAdapter.Item(getString(R.string.kernel_information), new KernelInformationFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.frequency_table), new FrequencyTableFragment())); ITEMS.add(new DAdapter.Header(getString(R.string.kernel))); ITEMS.add(new DAdapter.Item(getString(R.string.cpu), new CPUFragment())); if (CPUVoltage.hasCpuVoltage()) ITEMS.add(new DAdapter.Item(getString(R.string.cpu_voltage), new CPUVoltageFragment())); if (CPUHotplug.hasCpuHotplug()) ITEMS.add(new DAdapter.Item(getString(R.string.cpu_hotplug), new CPUHotplugFragment())); if (CoreControl.hasMinLittle()) ITEMS.add(new DAdapter.Item(getString(R.string.corecontrol), new CoreControlFragment())); if (Thermal.hasThermal()) ITEMS.add(new DAdapter.Item(getString(R.string.thermal), new ThermalFragment())); if (GPU.hasGpuControl()) ITEMS.add(new DAdapter.Item(getString(R.string.gpu), new GPUFragment())); if (Screen.hasScreen()) ITEMS.add(new DAdapter.Item(getString(R.string.screen), new ScreenFragment())); if (Wake.hasWake()) ITEMS.add(new DAdapter.Item(getString(R.string.wake_controls), new WakeFragment())); if (Sound.hasSound()) ITEMS.add(new DAdapter.Item(getString(R.string.sound), new SoundFragment())); if (!Utils.isTV(this)) ITEMS.add(new DAdapter.Item(getString(R.string.battery), new BatteryFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.io_scheduler), new IOFragment())); if (KSM.hasKsm()) ITEMS.add(new DAdapter.Item(getString(R.string.ksm), new KSMFragment())); if (LMK.getMinFrees() != null) ITEMS.add(new DAdapter.Item(getString(R.string.low_memory_killer), new LMKFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.virtual_memory), new VMFragment())); if (WakeLock.hasAnyWakelocks()) { ITEMS.add(new DAdapter.Item(getString(R.string.wakelocks), new WakeLockFragment())); } if (Entropy.hasEntropy()) ITEMS.add(new DAdapter.Item(getString(R.string.entropy), new EntropyFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.misc_controls), new MiscFragment())); ITEMS.add(new DAdapter.Header(getString(R.string.tools))); Downloads downloads; if ((downloads = new Downloads(this)).isSupported()) ITEMS.add(new DAdapter.Item(getString(R.string.downloads), DownloadsFragment.newInstance(downloads.getLink()))); if (Backup.hasBackup()) ITEMS.add(new DAdapter.Item(getString(R.string.backup), new BackupFragment())); if (Buildprop.hasBuildprop() && RootUtils.busyboxInstalled()) ITEMS.add(new DAdapter.Item(getString(R.string.build_prop_editor), new BuildpropFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.profile), new ProfileFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.recovery), new RecoveryFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.initd), new InitdFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.startup_commands), new StartUpCommandsFragment())); ITEMS.add(new DAdapter.Header(getString(R.string.other))); ITEMS.add(new DAdapter.Item(getString(R.string.settings), new SettingsFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.faq), new FAQFragment())); ITEMS.add(new DAdapter.Item(getString(R.string.about_us), new AboutusFragment())); }
Example #6
Source File: NavigationActivity.java From KernelAdiutor with GNU General Public License v3.0 | 4 votes |
private void initFragments() { mFragments.clear(); mFragments.add(new NavigationActivity.NavigationFragment(R.string.statistics)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.overall, OverallFragment.class, R.drawable.ic_chart)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.device, DeviceFragment.class, R.drawable.ic_device)); if (Device.MemInfo.getInstance().getItems().size() > 0) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.memory, MemoryFragment.class, R.drawable.ic_save)); } if (Device.Input.getInstance().supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.inputs, InputsFragment.class, R.drawable.ic_keyboard)); } mFragments.add(new NavigationActivity.NavigationFragment(R.string.kernel)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.cpu, CPUFragment.class, R.drawable.ic_cpu)); if (Voltage.getInstance().supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.cpu_voltage, CPUVoltageFragment.class, R.drawable.ic_bolt)); } if (Hotplug.supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.cpu_hotplug, CPUHotplugFragment.class, R.drawable.ic_switch)); } if (Thermal.supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.thermal, ThermalFragment.class, R.drawable.ic_temperature)); } if (GPU.supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.gpu, GPUFragment.class, R.drawable.ic_gpu)); } if (Screen.supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.screen, ScreenFragment.class, R.drawable.ic_display)); } if (Wake.supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.wake, WakeFragment.class, R.drawable.ic_unlock)); } if (Sound.getInstance().supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.sound, SoundFragment.class, R.drawable.ic_music)); } if (Battery.getInstance(this).supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.battery, BatteryFragment.class, R.drawable.ic_battery)); } if (LED.getInstance().supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.led, LEDFragment.class, R.drawable.ic_led)); } if (IO.getInstance().supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.io_scheduler, IOFragment.class, R.drawable.ic_sdcard)); } if (KSM.getInstance().supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.ksm, KSMFragment.class, R.drawable.ic_merge)); } if (LMK.supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.lmk, LMKFragment.class, R.drawable.ic_stackoverflow)); } mFragments.add(new NavigationActivity.NavigationFragment(R.string.virtual_memory, VMFragment.class, R.drawable.ic_server)); if (Entropy.supported()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.entropy, EntropyFragment.class, R.drawable.ic_numbers)); } mFragments.add(new NavigationActivity.NavigationFragment(R.string.misc, MiscFragment.class, R.drawable.ic_clear)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.tools)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.data_sharing, DataSharingFragment.class, R.drawable.ic_database)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.custom_controls, CustomControlsFragment.class, R.drawable.ic_console)); SupportedDownloads supportedDownloads = new SupportedDownloads(this); if (supportedDownloads.getLink() != null) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.downloads, DownloadsFragment.class, R.drawable.ic_download)); } if (Backup.hasBackup()) { mFragments.add(new NavigationActivity.NavigationFragment(R.string.backup, BackupFragment.class, R.drawable.ic_restore)); } mFragments.add(new NavigationActivity.NavigationFragment(R.string.build_prop_editor, BuildpropFragment.class, R.drawable.ic_edit)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.profile, ProfileFragment.class, R.drawable.ic_layers)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.recovery, RecoveryFragment.class, R.drawable.ic_security)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.initd, InitdFragment.class, R.drawable.ic_shell)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.on_boot, OnBootFragment.class, R.drawable.ic_start)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.other)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.settings, SettingsFragment.class, R.drawable.ic_settings)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.about, AboutFragment.class, R.drawable.ic_about)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.contributors, ContributorsFragment.class, R.drawable.ic_people)); mFragments.add(new NavigationActivity.NavigationFragment(R.string.help, HelpFragment.class, R.drawable.ic_help)); }