mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-27 12:41:03 +00:00
refactor
This commit is contained in:
@@ -50,14 +50,6 @@ public class MusicActivityHook extends BaseActivityHook {
|
||||
ResourceType.STYLE, "Theme.ReVanced.YouTubeMusic.Settings"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the resource ID for the YouTube Music settings layout.
|
||||
*/
|
||||
@Override
|
||||
protected int getContentViewResourceId() {
|
||||
return LAYOUT_REVANCED_SETTINGS_WITH_TOOLBAR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the fixed background color for the toolbar.
|
||||
*/
|
||||
|
||||
@@ -125,16 +125,18 @@ public abstract class BaseActivityHook extends Activity {
|
||||
toolBarParent.addView(toolbar, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the resource ID for the content view layout.
|
||||
*/
|
||||
protected int getContentViewResourceId() {
|
||||
return LAYOUT_REVANCED_SETTINGS_WITH_TOOLBAR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customizes the activity's theme.
|
||||
*/
|
||||
protected abstract void customizeActivityTheme(Activity activity);
|
||||
|
||||
/**
|
||||
* Returns the resource ID for the content view layout.
|
||||
*/
|
||||
protected abstract int getContentViewResourceId();
|
||||
|
||||
/**
|
||||
* Returns the background color for the toolbar.
|
||||
*/
|
||||
|
||||
@@ -48,14 +48,6 @@ public class YouTubeActivityHook extends BaseActivityHook {
|
||||
activity.setTheme(Utils.getResourceIdentifierOrThrow(ResourceType.STYLE, theme));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the resource ID for the YouTube settings layout.
|
||||
*/
|
||||
@Override
|
||||
protected int getContentViewResourceId() {
|
||||
return LAYOUT_REVANCED_SETTINGS_WITH_TOOLBAR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the toolbar background color based on dark/light mode.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user