mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-01 05:48:22 +03:00
BraveNewPipe: Inherit from this class instead of {@link BasePreferenceFragment} to manipulate config options.
If you have a fork and flavors and want to alter some config options use this class especially overwrite the {@link #manipulateCreatedPreferenceOptions()} in which you can manipulate
This commit is contained in:
parent
db53faa50d
commit
641cd7366c
1 changed files with 35 additions and 0 deletions
|
@ -0,0 +1,35 @@
|
|||
package org.schabi.newpipe.settings;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
|
||||
/**
|
||||
* Inherit from this class instead of {@link BasePreferenceFragment} to manipulate config options.
|
||||
* <p>
|
||||
* If you have a fork and flavors and want to alter some config options use this class especially
|
||||
* overwrite the {@link #manipulateCreatedPreferenceOptions()} in which you can manipulate
|
||||
*/
|
||||
public abstract class BraveBasePreferenceFragment extends BasePreferenceFragment {
|
||||
|
||||
/**
|
||||
* After creation of this settings fragment you may want to manipulate
|
||||
* some settings.
|
||||
* <p>
|
||||
* Eg. if you've some flavor's and want them to have different options
|
||||
* here is a good place to manipulate them programmatically.
|
||||
*/
|
||||
protected void manipulateCreatedPreferenceOptions() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(
|
||||
@NonNull final View rootView,
|
||||
@Nullable final Bundle savedInstanceState) {
|
||||
super.onViewCreated(rootView, savedInstanceState);
|
||||
manipulateCreatedPreferenceOptions();
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue